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/react

v1.0.0

Published

React web components for the Dangerous Things design system

Readme

@dangerousthings/react

React web components for the Dangerous Things design system — 20 themed components wrapping @dangerousthings/web CSS with React APIs matching @dangerousthings/react-native for cross-platform parity.

Install

npm install @dangerousthings/react

Peer Dependencies

npm install react react-dom @dangerousthings/tokens @dangerousthings/web

Setup

Wrap your app with DTWebThemeProvider and import the web CSS bundle:

import "@dangerousthings/web";
import { DTWebThemeProvider } from "@dangerousthings/react";

export default function App() {
  return (
    <DTWebThemeProvider brand="dt" theme="dark">
      {/* your app */}
    </DTWebThemeProvider>
  );
}

The provider sets data-brand and data-theme attributes on a wrapper div and exposes brand/theme via React context.

Components

Bevel & Layout

| Component | Description | |-----------|-------------| | DTCard | Beveled card with header, progress bar, and mode colors | | DTButton | Beveled button with variant colors | | DTLabel | Top-right beveled label with status colors | | DTChip | Compact labeled element | | DTMediaFrame | Diagonal beveled frame for images | | DTModal | Modal dialog with beveled corners | | DTDrawer | Side drawer with edge bevels | | DTHexagon | Decorative hexagon SVG shape |

Forms

| Component | Description | |-----------|-------------| | DTTextInput | Sharp-cornered input with focus glow | | DTCheckbox | Beveled checkbox with opposing corner cuts | | DTSwitch | Angular toggle switch | | DTRadioGroup | Hexagonal radio buttons | | DTQuantityStepper | Beveled +/- increment buttons | | DTSearchInput | Search-styled text input |

Layout & Animation

| Component | Description | |-----------|-------------| | DTProgressBar | Angular progress bar with optional label | | DTAccordion | Collapsible sections with accent border | | DTStaggerContainer | Staggered scale-in entrance animation for children | | DTBadgeOverlay | Absolute-positioned badge wrapper |

Filter & Feature

| Component | Description | |-----------|-------------| | DTMenu | Dropdown menu with item variants | | DTFeatureLegend | Product feature grid with icons and rotated labels | | DTMobileFilterOverlay | Full-screen slide-up filter overlay with backdrop | | DTGallery | Image gallery |

Animation Hooks

| Hook | Description | |------|-------------| | useScaleIn | Scale 0 to 1 entrance animation | | usePulse | Looping opacity pulse animation |

Usage Examples

import { DTButton, DTCard, DTTextInput } from "@dangerousthings/react";

// Button with variant
<DTButton variant="normal" onClick={handleClick}>
  Scan NFC
</DTButton>

// Card with title and progress bar
<DTCard title="PRODUCT" variant="emphasis" progress={60}>
  <p>60% progress</p>
</DTCard>

// Text input
<DTTextInput variant="normal" label="Username" />

Theme Utilities

import { useDTWebTheme } from "@dangerousthings/react";

const { brand, theme } = useDTWebTheme();
// brand: "dt" | "classic"
// theme: "dark" | "light"

Variant Utilities

import { getVariantClass, variantToClassName } from "@dangerousthings/react";

getVariantClass("emphasis"); // mode class name for CSS
variantToClassName("warning"); // token-level variant mapping

Monorepo

Part of the DT Design System monorepo.

License

MIT