### Install @spectrum-css/ui-icons Source: https://github.com/adobe/spectrum-css/blob/main/ui-icons/README.md Install the @spectrum-css/ui-icons package as a development dependency using yarn. ```sh yarn add -DW @spectrum-css/ui-icons ``` -------------------------------- ### Render Heading Sizes Example Source: https://github.com/adobe/spectrum-css/blob/main/components/typography/stories/typography.mdx Renders examples of different heading sizes using a Storybook Canvas. ```javascript ``` -------------------------------- ### Install stylelint-no-unknown-custom-properties Source: https://github.com/adobe/spectrum-css/blob/main/plugins/stylelint-no-unknown-custom-properties/README.md Install the plugin as a development dependency using yarn. ```sh yarn add -D @spectrum-tools/stylelint-no-unknown-custom-properties ``` -------------------------------- ### Install Spectrum CSS Core and Components Source: https://context7.com/adobe/spectrum-css/llms.txt Install core tokens and common components, or individual components as needed using npm or yarn. ```bash # Install core tokens and common components yarn add -DW @spectrum-css/tokens @spectrum-css/typography @spectrum-css/page @spectrum-css/icon @spectrum-css/button # Or install individual components as needed yarn add @spectrum-css/checkbox @spectrum-css/textfield @spectrum-css/modal ``` -------------------------------- ### Install Postcss-property-rollup Source: https://github.com/adobe/spectrum-css/blob/main/plugins/postcss-property-rollup/README.md Install the plugin using npm. ```sh npm install postcss-property-rollup ``` -------------------------------- ### Install Stylelint Plugins Source: https://github.com/adobe/spectrum-css/blob/main/plugins/README.md Install the necessary Stylelint plugins as development dependencies using yarn. ```sh yarn add -D stylelint-no-missing-var stylelint-suit-naming-pattern stylelint-use-logical ``` -------------------------------- ### Render Detail Sizes Example Source: https://github.com/adobe/spectrum-css/blob/main/components/typography/stories/typography.mdx Renders examples of different detail text sizes using a Storybook Canvas. ```javascript ``` -------------------------------- ### Install stylelint-no-unused-custom-properties Source: https://github.com/adobe/spectrum-css/blob/main/plugins/stylelint-no-unused-custom-properties/README.md Install the plugin as a development dependency using yarn. ```sh yarn add -D @spectrum-tools/stylelint-no-unused-custom-properties ``` -------------------------------- ### Render Default Typography Example Source: https://github.com/adobe/spectrum-css/blob/main/components/typography/stories/typography.mdx Renders the default typography example using a Storybook Canvas. ```javascript ``` -------------------------------- ### Render Heading and Body Pairing Example Source: https://github.com/adobe/spectrum-css/blob/main/components/typography/stories/typography.mdx Renders examples demonstrating the hierarchy between headings and body text using a Storybook Canvas. ```javascript ``` -------------------------------- ### CSS Input for Theming Layer Source: https://github.com/adobe/spectrum-css/blob/main/plugins/postcss-add-theming-layer/README.md Example CSS demonstrating different theming systems using container queries. ```css @container style(--system: legacy) { .component { --background-color: blue; } .component.is-selected { --background-color: darkblue; } .component .icon { --color: gray; } } @container style(--system: modern) { .component { --background-color: purple; } .component.is-selected { --background-color: darkpurple; } .component .icon { --color: white; } } ``` -------------------------------- ### Render Code Sizes Example Source: https://github.com/adobe/spectrum-css/blob/main/components/typography/stories/typography.mdx Renders examples of different code text sizes using a Storybook Canvas. ```javascript ``` -------------------------------- ### Install Spectrum CSS Components Source: https://github.com/adobe/spectrum-css/blob/main/README.md Install Spectrum CSS components and their peer dependencies using yarn. Ensure `@spectrum-css/tokens` is included as it provides essential design tokens. ```shell yarn add -DW @spectrum-css/tokens @spectrum-css/typography @spectrum-css/page @spectrum-css/icon @spectrum-css/button ``` -------------------------------- ### Basic HTML Setup for Spectrum CSS Source: https://context7.com/adobe/spectrum-css/llms.txt Set up a basic HTML page with Spectrum CSS context classes and stylesheet imports. Ensure global tokens are included first, followed by page layout and component styles. ```html
``` -------------------------------- ### Spectrum CSS Example Token Definitions Source: https://github.com/adobe/spectrum-css/wiki/How-to:-T-shirt-sizing-in-Spectrum-CSS Provides examples of how component-specific tokens are defined, referencing alias tokens with size variations. ```css --spectrum-button-m-primary-height: var(--spectrum-alias-item-height-m); --spectrum-button-l-primary-height: var(--spectrum-alias-item-height-l); ``` -------------------------------- ### Install Postcss Add Theming Layer with npm Source: https://github.com/adobe/spectrum-css/blob/main/plugins/postcss-add-theming-layer/README.md Add the dependency to your project using npm. ```sh npm install postcss-add-theming-layer ``` -------------------------------- ### Render Body Sizes Example Source: https://github.com/adobe/spectrum-css/blob/main/components/typography/stories/typography.mdx Renders examples of different body text sizes using a Storybook Canvas. ```javascript ``` -------------------------------- ### Install and Use PostCSS RGB Mapping Source: https://github.com/adobe/spectrum-css/blob/main/plugins/postcss-rgb-mapping/README.md Install the plugin using yarn and configure PostCSS to use it for transforming CSS files. ```sh yarn add -D @spectrum-tools/postcss-rgb-mapping postcss -u postcss-rgb-mapping -o dist/index.css src/index.css ``` -------------------------------- ### Install Postcss Add Theming Layer with Yarn Source: https://github.com/adobe/spectrum-css/blob/main/plugins/postcss-add-theming-layer/README.md Add the dependency to your project using Yarn. ```sh yarn add -DW postcss-add-theming-layer ``` -------------------------------- ### Render Internationalized Heading Example Source: https://github.com/adobe/spectrum-css/blob/main/components/typography/stories/typography.mdx Renders an example of internationalized heading typography using a Storybook Canvas. ```javascript ``` -------------------------------- ### Small Progress Bar Example Source: https://context7.com/adobe/spectrum-css/llms.txt Demonstrates a smaller sized progress bar using the 'spectrum-ProgressBar--sizeS' class. Suitable for compact UIs. ```htmlAre you sure you want to proceed with this action? This cannot be undone.
This modal takes up most of the screen with 32px margins.
This modal becomes fullscreen on small viewports.
This modal takes over the entire viewport with no margins.