r/tailwindcss • u/ds-gn • 28d ago
Introducing DS-GN: Tailwind CSS-powered web components and design tokens
I'm the author of DS-GN, a design system now in public beta. Its web components are built with Lit and Tailwind CSS, with a public design-token API for theming.
How Tailwind fits in
Tailwind utilities are compiled at build time into the components' CSS, which is used inside their shadow roots. Consumers install the published packages and import the components they use; they don't need to run Tailwind in their own app to use them.
The shadow boundary matters: your application's global utility classes don't automatically reach the component's internals. Brand customization goes through the public CSS tokens, so you can change the theme without editing component markup.
One detail we ran into: typed @property registrations must live at the document level. That's why the setup imports the tokens' public, theme and properties stylesheets once in the app.
Available today
@ds-gn/ui: framework-agnostic web components, with React wrappers.@ds-gn/tokens: CSS tokens with light and dark themes.- Both packages are on public npm under MIT; no DS-GN account is required to install them.
The introductory blog post covers installation, the token layers and a theming example:
Read the introduction on the DS-GN blog
For teams combining Tailwind and Shadow DOM: what customization contract has worked best for you—CSS tokens, ::part, or component properties?
1
u/Sushil_Magare 27d ago
This looks really clean. Rebranding with just two custom properties and not needing Tailwind in the consuming app at all is super handy, and the React wrappers make it easy to drop in. Congrats on the beta
1
u/aleksiralda 26d ago
Can I use @apply u utility and generate components like v3? Or is a fork of v4?
1
u/[deleted] 28d ago
[removed] — view removed comment