Gathering detailed insights and metrics for @spectrum-web-components/themes
Gathering detailed insights and metrics for @spectrum-web-components/themes
Gathering detailed insights and metrics for @spectrum-web-components/themes
Gathering detailed insights and metrics for @spectrum-web-components/themes
npm install @spectrum-web-components/themes
Typescript
Module System
Node Version
NPM Version
TypeScript (66.41%)
CSS (31.37%)
JavaScript (2.07%)
HTML (0.08%)
Handlebars (0.06%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
1,405 Stars
4,923 Commits
229 Forks
46 Watchers
249 Branches
342 Contributors
Updated on Jul 17, 2025
Latest Version
0.2.3
Package Id
@spectrum-web-components/themes@0.2.3
Unpacked Size
288.08 kB
Size
36.45 kB
File Count
54
NPM Version
lerna/3.16.4/node@v10.15.0+x64 (darwin)
Node Version
10.15.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
2
An sp-theme sets the rendering theme for all child components.
The Spectrum design system supports four color themes and two different
scales. spectrum-web-components
currently supports two of the four
color themes (dark and light) one one of the scales (medium).
1<style type="text/css"> 2 #example { 3 width: 500px; 4 padding: 3em; 5 background-color: var(--spectrum-global-color-gray-100); 6 color: var(--spectrum-global-color-gray-800); 7 } 8 9 #buttons { 10 margin-top: 2em; 11 } 12</style> 13<sp-theme color="light"> 14 <div id="example"> 15 <div> 16 <sp-slider 17 value="5" 18 step="1" 19 min="1" 20 max="11" 21 label="Volume" 22 id="volume-slider" 23 ></sp-slider> 24 </div> 25 <div><sp-switch>Overdrive</sp-switch></div> 26 <div id="buttons"> 27 <sp-button variant="primary">Cancel</sp-button> 28 <sp-button variant="cta">Continue</sp-button> 29 </div> 30 </div> 31</sp-theme>
1<style type="text/css"> 2 #example { 3 width: 500px; 4 padding: 3em; 5 background-color: var(--spectrum-global-color-gray-100); 6 color: var(--spectrum-global-color-gray-800); 7 } 8 9 #buttons { 10 margin-top: 2em; 11 } 12</style> 13<sp-theme color="dark"> 14 <div id="example"> 15 <div> 16 <sp-slider 17 value="5" 18 step="1" 19 min="1" 20 max="11" 21 label="Volume" 22 id="volume-slider" 23 ></sp-slider> 24 </div> 25 <div><sp-switch>Overdrive</sp-switch></div> 26 <div id="buttons"> 27 <sp-button variant="primary">Cancel</sp-button> 28 <sp-button variant="cta">Continue</sp-button> 29 </div> 30 </div> 31</sp-theme>
There are a few cases where it is necessary to embed one theme within another. For example, if you have an application that is using a dark theme that is previewing or editing content that will be displayed in a light theme.
If you only want to change colors, you can use the sp-theme-dark
or
sp-theme-light
class instead. They are a little lighter weight than
the full sp-theme
class. You should still use sp-theme
at the root
because it installs extra styles that do not change between colors.
1<style type="text/css"> 2 #outer { 3 width: 500px; 4 padding: 3em; 5 background-color: var(--spectrum-global-color-gray-100); 6 color: var(--spectrum-global-color-gray-800); 7 } 8 9 #inner { 10 margin-top: 2em; 11 padding: 2em; 12 background-color: var(--spectrum-global-color-gray-100); 13 color: var(--spectrum-global-color-gray-800); 14 } 15 16 #buttons { 17 margin-top: 2em; 18 } 19</style> 20<sp-theme color="dark"> 21 <div id="outer"> 22 <div> 23 <sp-slider 24 value="5" 25 step="1" 26 min="1" 27 max="11" 28 label="Volume" 29 id="volume-slider" 30 ></sp-slider> 31 </div> 32 <div><sp-switch>Overdrive</sp-switch></div> 33 <div id="buttons"> 34 <sp-button variant="primary">Cancel</sp-button> 35 <sp-button variant="cta">Continue</sp-button> 36 </div> 37 <sp-theme-light> 38 <div id="inner"> 39 <div> 40 <sp-slider 41 value="5" 42 step="1" 43 min="1" 44 max="11" 45 label="Volume" 46 id="volume-slider" 47 ></sp-slider> 48 </div> 49 <div><sp-switch>Overdrive</sp-switch></div> 50 <div id="buttons"> 51 <sp-button variant="primary">Cancel</sp-button> 52 <sp-button variant="cta">Continue</sp-button> 53 </div> 54 </div> 55 </sp-theme-light> 56 </div> 57</sp-theme>
No vulnerabilities found.
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
Found 24/28 approved changesets -- score normalized to 8
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
36 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More