<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: akarpov91</title>
    <description>The latest articles on DEV Community by akarpov91 (@akarpov91).</description>
    <link>https://dev.to/akarpov91</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F911443%2F48c7fb3b-a0c3-4a6a-910c-1685b981d033.png</url>
      <title>DEV Community: akarpov91</title>
      <link>https://dev.to/akarpov91</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akarpov91"/>
    <language>en</language>
    <item>
      <title>Introducing DS-GN: Web components and design tokens</title>
      <dc:creator>akarpov91</dc:creator>
      <pubDate>Mon, 19 Oct 2026 19:34:42 +0000</pubDate>
      <link>https://dev.to/akarpov91/introducing-ds-gn-web-components-and-design-tokens-47k2</link>
      <guid>https://dev.to/akarpov91/introducing-ds-gn-web-components-and-design-tokens-47k2</guid>
      <description>&lt;p&gt;&lt;a href="https://ds-gn.com/blog/introducing-ds-gn?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=launch_post" rel="noopener noreferrer"&gt;Read the original article on the DS-GN blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;DS-GN — pronounced "design" — builds UI components and design tokens for engineers and&lt;br&gt;
design-system maintainers. Every team rebuilds the same buttons, inputs, and type scale;&lt;br&gt;
we want that work to start from a shared, well-tested foundation instead.&lt;/p&gt;

&lt;p&gt;This blog is where the people building DS-GN write about how it works. Posts ship with&lt;br&gt;
code you can run. This first one covers what you can install today, and how to get from&lt;br&gt;
an empty project to a themed component.&lt;/p&gt;
&lt;h2&gt;
  
  
  What you can install today
&lt;/h2&gt;

&lt;p&gt;DS-GN publishes two packages to public npm. Neither needs an account, an entitlement&lt;br&gt;
token, or a custom &lt;code&gt;.npmrc&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@ds-gn/ui&lt;/code&gt;&lt;/strong&gt; — 26 web components, built with Lit and exposed as standard custom
elements, with generated React wrappers. They work in plain HTML, React, Vue, Svelte,
Solid, or anything else that can render a tag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@ds-gn/tokens&lt;/code&gt;&lt;/strong&gt; — the color, typography, spacing, radius, and shadow tokens the
components consume, as CSS variables and Tailwind theme values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both are in Public Beta. While they remain &lt;code&gt;0.x&lt;/code&gt;, patch releases do not intentionally&lt;br&gt;
break documented APIs, and planned breaking changes ship in a minor release with&lt;br&gt;
migration guidance.&lt;/p&gt;
&lt;h2&gt;
  
  
  From install to a themed component
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Install the packages
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;bun add @ds-gn/ui @ds-gn/tokens
2 packages installed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Install the tokens package explicitly, even though the components depend on it — your&lt;br&gt;
application imports its stylesheets directly. &lt;code&gt;lit&lt;/code&gt; is a peer dependency; most package&lt;br&gt;
managers install it for you.&lt;/p&gt;
&lt;h3&gt;
  
  
  Load the tokens
&lt;/h3&gt;

&lt;p&gt;Import all three token stylesheets, once, in your entry stylesheet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s2"&gt;'@ds-gn/tokens/public'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s2"&gt;'@ds-gn/tokens/theme'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s2"&gt;'@ds-gn/tokens/properties'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;public&lt;/strong&gt; is the override API — every token you are allowed to redefine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;theme&lt;/strong&gt; maps those tokens to their light and dark values.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;properties&lt;/strong&gt; registers the typed custom properties the components depend on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The document owns the token layers; every shadow root reads from them. &lt;a href="https://ds-gn.com/blog/introducing-ds-gn?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=launch_post#load-the-tokens" rel="noopener noreferrer"&gt;View the token-layer diagram&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do not skip properties&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A shadow root cannot register &lt;code&gt;@property&lt;/code&gt; — only the document can. Without the&lt;br&gt;
&lt;code&gt;properties&lt;/code&gt; import, declarations that read those tokens are dropped at computed-value&lt;br&gt;
time. Nothing errors, and most of the component still looks right.&lt;/p&gt;
&lt;h3&gt;
  
  
  Import a component
&lt;/h3&gt;

&lt;p&gt;Importing a component module registers its custom element. Nothing is registered&lt;br&gt;
globally on your behalf, so you ship only what you use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ds-gn/ui/button&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dsgn-button&lt;/span&gt; &lt;span class="na"&gt;appearance=&lt;/span&gt;&lt;span class="s"&gt;"solid"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Get started&lt;span class="nt"&gt;&amp;lt;/dsgn-button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Rebrand with two custom properties
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;public&lt;/code&gt; layer is the contract. Redefine a token there and every component that reads&lt;br&gt;
it follows — in light and dark — without touching component code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--brand-on-light&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color-indigo-500&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--brand-on-dark&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color-indigo-400&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Override tokens, not components&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Public tokens are covered by the &lt;code&gt;0.x&lt;/code&gt; compatibility contract. A component's internal&lt;br&gt;
markup is not public API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coming from LightLeap
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;LightLeap is now DS-GN&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The packages moved from &lt;code&gt;@lightleaplabs/ui&lt;/code&gt; and &lt;code&gt;@lightleaplabs/tokens&lt;/code&gt; to &lt;code&gt;@ds-gn/ui&lt;/code&gt;&lt;br&gt;
and &lt;code&gt;@ds-gn/tokens&lt;/code&gt;, and &lt;code&gt;lll-*&lt;/code&gt; elements are now &lt;code&gt;dsgn-*&lt;/code&gt;. Published LightLeap versions&lt;br&gt;
remain installable. The &lt;a href="https://ds-gn.com/docs/getting-started/migrate-from-lightleap/" rel="noopener noreferrer"&gt;migration guide&lt;/a&gt;&lt;br&gt;
has before-and-after examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  What comes next
&lt;/h2&gt;

&lt;p&gt;Our longer-term direction is design system orchestration: compose a system from a&lt;br&gt;
canonical core, then customize it with language, styling, and tooling adapters. The&lt;br&gt;
&lt;code&gt;@ds-gn-cli/create&lt;/code&gt; CLI that does this is coming soon — &lt;a href="https://ds-gn.com/#cli-waitlist" rel="noopener noreferrer"&gt;join the waitlist&lt;/a&gt; for&lt;br&gt;
availability updates.&lt;/p&gt;

&lt;p&gt;On this blog, upcoming posts go deeper into the pieces this one skimmed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How the token build emits Tailwind &lt;code&gt;@theme&lt;/code&gt;, public CSS variables, and shadow-DOM
variables from one source.&lt;/li&gt;
&lt;li&gt;Why our components register their own elements, and how that keeps bundles
tree-shakable.&lt;/li&gt;
&lt;li&gt;How we certify each Public Beta component for accessibility before it ships.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Until then, the &lt;a href="https://ds-gn.com/docs/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; covers setup and every&lt;br&gt;
component's API, &lt;a href="https://storybook.ds-gn.com" rel="noopener noreferrer"&gt;Storybook&lt;/a&gt; shows each component live, and&lt;br&gt;
the &lt;a href="https://ds-gn.com/docs/changelog/" rel="noopener noreferrer"&gt;changelog&lt;/a&gt; tracks every release.&lt;/p&gt;

&lt;p&gt;Originally published on &lt;a href="https://ds-gn.com/blog/introducing-ds-gn?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=launch_post" rel="noopener noreferrer"&gt;the DS-GN blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>webcomponents</category>
      <category>css</category>
      <category>designsystem</category>
    </item>
  </channel>
</rss>
