Migrates the storefront's colourblind palettes into tokens, generated as [data-cb] CSS blocks (dark mode only) for both brands. The storefront's ΔE / contrast check now runs in the tokens build and fails on a bad palette; it caught the deuteranopia error orange at 4.4:1 on classic's navy, so that value is now #c86000. Animation speed rides along: animations.css scales durations by --motion-scale, and both data-motion="0" and the classic brand bypass animation outright. Brand tokens carry an `animations` flag so React Native forces motion to 0 for classic too. DTWebThemeProvider and DTThemeProvider take colorVision and motionScale; buildThemeFromBrand moves into the react-native package from the showcase. DTSettingsPanel (react and react-native) renders theme, animation speed and colour vision as controlled sections. Changesets: onlyUpdatePeerDependentsWhenOutOfRange, so a minor on tokens no longer majors react through its `*` peer range. Versions bumped: tokens 0.4.0, web 0.6.0, react 2.2.0, react-native 0.5.0. Design: docs/plans/2026-09-12-color-vision-and-settings-design.md Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dangerousthings/web
Web CSS themes and components for the Dangerous Things design system — bevels, animations, and form styles powered by CSS custom properties.
Install
npm install @dangerousthings/web
Usage
Import the full bundle (base tokens + all components):
@import "@dangerousthings/web";
Or import individual pieces:
/* Brand tokens */
@import "@dangerousthings/web/tokens/dt.css";
/* Individual components */
@import "@dangerousthings/web/components/bevels.css";
@import "@dangerousthings/web/components/forms-dt.css";
Switching Brands
Swap the token import to change the entire look:
/* Neon cyberpunk */
@import "@dangerousthings/web/tokens/dt.css";
/* Dark navy + magenta */
@import "@dangerousthings/web/tokens/classic.css";
Theme Registry (JS)
For runtime theme switching:
import { themes, brands } from "@dangerousthings/web/theme-registry";
CSS Modules
| File | Description |
|---|---|
bevels.css |
Angular clip-path bevels for cards, buttons, labels, modals, drawers. Card color modes, selected states, progress bars, badge overlays, interactive bevel buttons |
forms-dt.css |
Text inputs, checkboxes, switches, radio buttons, progress bars, accordions, steppers, menu items, filter headers, filter overlays |
animations.css |
Entrance animations (scale-in, fade-in, slide-up), interactive animations (pulse, ping, spin), stagger container, transition utilities |
scrollbar.css |
Thin neon scrollbar styling scoped under [data-brand="dt"] |
feature-legend.css |
Product feature grid with icons and rotated labels, state-based coloring |
Key Classes
Bevels — .dt-bevel-card, .dt-bevel-btn, .dt-bevel-label, .dt-bevel-modal, .dt-bevel-drawer-left, .dt-bevel-drawer-right, .dt-bevel-sm
Card Modes — .mode-normal, .mode-emphasis, .mode-warning, .mode-success, .mode-other, .card.selected, .dt-card-progress, .dt-badge-overlay
Interactive Buttons — .dt-btn (outlined rectangle, bevels on hover/select)
Animations — .dt-animate-scale-in, .dt-animate-fade-in, .dt-animate-slide-up, .dt-animate-pulse, .dt-animate-ping, .dt-animate-spin, .dt-stagger-container
Scrollbar — .dt-scrollbar, .dt-scrollbar-mode
Filters — .dt-menu-item, .dt-filter-header, .dt-filter-overlay
Exports
| Path | Description |
|---|---|
@dangerousthings/web |
Full CSS bundle (base + all components) |
@dangerousthings/web/tokens/* |
Per-brand CSS custom properties |
@dangerousthings/web/components/* |
Individual CSS component modules |
@dangerousthings/web/fonts/* |
Tektur font files |
@dangerousthings/web/theme-registry |
JS theme definitions for runtime switching |