Package Installation
Install the Meteor tokens package using your preferred package manager:Import CSS Tokens
After installation, import the token CSS files into your application. The package provides different files for different use cases.Basic Setup (Light Theme Only)
For a basic setup with light theme support:With Dark Mode Support
To support both light and dark themes:The dark theme CSS uses the
[data-theme="dark"] attribute selector, so both files can be imported without conflicts.Available Files
The package exports the following files:| Export Path | Description |
|---|---|
@shopware-ag/meteor-tokens/primitives.css | Foundation primitive tokens (colors, scales) |
@shopware-ag/meteor-tokens/administration/light.css | Semantic tokens for light theme |
@shopware-ag/meteor-tokens/administration/dark.css | Semantic tokens for dark theme |
@shopware-ag/meteor-tokens/foundation/primitives.json | Raw JSON token dictionary |
Using with Different Frameworks
React / Next.js
Import tokens in your root layout or app file:Vue / Nuxt
Import in your main entry file:Vanilla JavaScript
Import in your main JavaScript file:CSS/SCSS
You can also import directly in CSS if your bundler supports it:Webpack Configuration
If you’re using Webpack, ensure you havecss-loader configured:
Vite Configuration
Vite supports CSS imports out of the box, no additional configuration needed:Verifying Installation
After installation, verify that tokens are loaded by checking the browser console:If the token value is returned correctly, your installation is complete!
Troubleshooting
Tokens not applying
Tokens not applying
Make sure you’ve imported the CSS files before your component styles. Token CSS should be loaded at the application root level.
Dark mode not working
Dark mode not working
Ensure you’ve imported the dark theme CSS and added the
data-theme="dark" attribute to a parent element.Build errors with CSS imports
Build errors with CSS imports
Check that your bundler is configured to handle CSS imports. You may need to install
css-loader for Webpack or ensure Vite’s CSS support is enabled.Next Steps
Usage Guide
Learn how to use design tokens in your CSS and components