npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dangerousthings/tailwind-preset

v0.1.1

Published

Tailwind CSS v3 preset mapping DT design tokens to Tailwind theme

Downloads

171

Readme

@dangerousthings/tailwind-preset

Tailwind CSS v3 preset that maps Dangerous Things design tokens to Tailwind theme values. Uses CSS custom property references so the same utility classes work across both DT and Classic brands at runtime.

Install

npm install @dangerousthings/tailwind-preset

Peer Dependencies

npm install tailwindcss@^3.4

You also need a brand token CSS file loaded (from @dangerousthings/web or @dangerousthings/tokens).

Setup

Add the preset to your tailwind.config.js:

import dtPreset from "@dangerousthings/tailwind-preset";

export default {
  presets: [dtPreset],
  content: ["./src/**/*.{tsx,ts,html}"],
};

Available Utilities

Colors

All DT design token colors are available under the dt- prefix. Colors with -rgb variants support Tailwind opacity modifiers.

<div class="bg-dt-bg text-dt-text-primary">
  <h1 class="text-dt-primary">Heading</h1>
  <p class="text-dt-text-secondary">Body text</p>
  <button class="bg-dt-primary/50 text-dt-bg">50% opacity</button>
</div>

| Utility | Token | |---------|-------| | bg-dt-bg, text-dt-bg | --color-bg | | bg-dt-surface | --color-surface | | bg-dt-primary, text-dt-primary | --color-primary | | bg-dt-secondary | --color-secondary | | bg-dt-accent | --color-accent | | bg-dt-error | --color-error | | text-dt-text-primary | --color-text-primary | | text-dt-text-secondary | --color-text-secondary | | text-dt-text-muted | --color-text-muted |

Mode Colors

Card mode colors are available under the mode- prefix:

<div class="border-mode-normal">Normal</div>
<div class="text-mode-emphasis">Emphasis</div>
<div class="bg-mode-warning">Warning</div>

Spacing

<div class="p-dt-4 gap-dt-2 m-dt-1">...</div>

| Utility | Token | |---------|-------| | *-dt-1 through *-dt-8 | --space-1 through --space-8 |

Border Radius

<div class="rounded-dt">Default</div>
<div class="rounded-dt-sm">Small</div>
<div class="rounded-dt-lg">Large</div>

Font Family

<h1 class="font-dt-heading">Tektur heading</h1>
<p class="font-dt-body">Body text</p>
<code class="font-dt-mono">Monospace</code>

Brand Switching

Because the preset uses var() references, switching brands at runtime requires only changing the CSS custom properties (e.g., via data-brand attribute). No Tailwind rebuild is needed.

<div data-brand="dt">Cyan neon theme</div>
<div data-brand="classic">Navy magenta theme</div>

Monorepo

Part of the DT Design System monorepo.

License

MIT