<?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: Prerak Mathur</title>
    <description>The latest articles on DEV Community by Prerak Mathur (@prerak).</description>
    <link>https://dev.to/prerak</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F733618%2F3452724f-164a-4bb9-a51e-b599011df9f3.jpeg</url>
      <title>DEV Community: Prerak Mathur</title>
      <link>https://dev.to/prerak</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prerak"/>
    <language>en</language>
    <item>
      <title>Tokis: A Performance-First, Token-Native UI Library for Building Modern Design Systems</title>
      <dc:creator>Prerak Mathur</dc:creator>
      <pubDate>Sun, 15 Mar 2026 00:40:25 +0000</pubDate>
      <link>https://dev.to/prerak/tokis-a-performance-first-token-native-ui-library-for-building-modern-design-systems-2cad</link>
      <guid>https://dev.to/prerak/tokis-a-performance-first-token-native-ui-library-for-building-modern-design-systems-2cad</guid>
      <description>&lt;h1&gt;
  
  
  Tokis: An experiment in building a token-first UI library
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhoq3yew0vckmh26k6ix5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhoq3yew0vckmh26k6ix5.png" alt=" " width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Over the past few months I’ve been experimenting with a side project called &lt;strong&gt;Tokis&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It didn’t start as a UI library.&lt;/p&gt;

&lt;p&gt;It started because I kept running into the same issue on frontend projects: styling slowly drifting out of control.&lt;/p&gt;

&lt;p&gt;At the beginning everything feels organized. You have a couple of components, a few colors, and maybe some utility classes. But as the project grows, things start getting messy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;spacing values start diverging
&lt;/li&gt;
&lt;li&gt;colors get duplicated everywhere
&lt;/li&gt;
&lt;li&gt;components slowly become inconsistent
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Eventually even simple design updates become annoying because the same values exist in dozens of places.&lt;/p&gt;

&lt;p&gt;So I wanted to try something different: &lt;strong&gt;starting from design tokens instead of components.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That idea turned into Tokis.&lt;/p&gt;

&lt;p&gt;Docs and playground:&lt;br&gt;&lt;br&gt;
&lt;a href="https://prerakmathur20.github.io/TokisWebsite/" rel="noopener noreferrer"&gt;https://prerakmathur20.github.io/TokisWebsite/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;npm package:&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/@tokis/tokis" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@tokis/tokis&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs6ul2o25ajdi9p4djwuw.png" alt=" " width="800" height="636"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Starting with tokens
&lt;/h2&gt;

&lt;p&gt;The basic idea behind Tokis is pretty simple.&lt;/p&gt;

&lt;p&gt;Instead of building components first, the system starts with &lt;strong&gt;design tokens&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;colors
&lt;/li&gt;
&lt;li&gt;spacing
&lt;/li&gt;
&lt;li&gt;typography
&lt;/li&gt;
&lt;li&gt;shadows
&lt;/li&gt;
&lt;li&gt;motion
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tokens become the foundation for everything else.&lt;/p&gt;

&lt;p&gt;From there you can build &lt;strong&gt;primitives&lt;/strong&gt;, and finally the actual UI components used in an app.&lt;/p&gt;

&lt;p&gt;Conceptually it looks something like this:&lt;/p&gt;

&lt;p&gt;tokens → primitives → components&lt;/p&gt;

&lt;p&gt;This structure makes it easier to keep styling consistent as a project grows.&lt;/p&gt;




&lt;h2&gt;
  
  
  Avoiding runtime styling
&lt;/h2&gt;

&lt;p&gt;One thing I wanted to experiment with was &lt;strong&gt;zero runtime styling&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Many UI libraries rely on runtime CSS-in-JS or style injection. That approach is flexible, but it also adds runtime overhead and sometimes increases bundle size.&lt;/p&gt;

&lt;p&gt;Tokis tries to resolve styling ahead of time so the runtime stays small.&lt;/p&gt;

&lt;p&gt;It’s a small architectural decision, but it can make a difference in larger applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  Headless primitives
&lt;/h2&gt;

&lt;p&gt;Another design decision was keeping the primitives &lt;strong&gt;headless&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;They handle behavior like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;focus management
&lt;/li&gt;
&lt;li&gt;accessibility helpers
&lt;/li&gt;
&lt;li&gt;interaction patterns
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But they don’t enforce a specific visual style.&lt;/p&gt;

&lt;p&gt;This makes it easier to build your own design system on top instead of being locked into predefined styling.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsutfdmod2zuicuackbi4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsutfdmod2zuicuackbi4.png" alt=" " width="800" height="773"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Interactive docs playground
&lt;/h2&gt;

&lt;p&gt;One thing I personally find frustrating about many UI libraries is documentation that only shows static code examples.&lt;/p&gt;

&lt;p&gt;So I added a small &lt;strong&gt;interactive playground&lt;/strong&gt; to the docs site where you can experiment with components directly in the browser.&lt;/p&gt;

&lt;p&gt;If you want to try it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://prerakmathur20.github.io/TokisWebsite/" rel="noopener noreferrer"&gt;https://prerakmathur20.github.io/TokisWebsite/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fif33ja6cltvu2idxaw0n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fif33ja6cltvu2idxaw0n.png" alt=" " width="800" height="696"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Still an experiment
&lt;/h2&gt;

&lt;p&gt;Tokis is still very early and definitely more of an &lt;strong&gt;experiment in UI architecture&lt;/strong&gt; than a finished framework.&lt;/p&gt;

&lt;p&gt;The goal was mainly to explore a few ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;token-first design systems
&lt;/li&gt;
&lt;li&gt;zero runtime styling
&lt;/li&gt;
&lt;li&gt;headless primitives for UI behavior
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’ve worked on design systems or component libraries before, I’d be really curious to hear your thoughts.&lt;/p&gt;

&lt;p&gt;Feedback is always welcome.&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>designsystem</category>
    </item>
  </channel>
</rss>
