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

@rdna/radiants

v0.1.7

Published

Radiants theme package for DNA - retro pixel aesthetic

Downloads

653

Readme

@rdna/radiants

Radiants theme package for DNA (Design Nexus Architecture) — a retro pixel aesthetic design system.

Installation

npm install @rdna/radiants

Usage

CSS Tokens

Import the theme tokens in your CSS:

/* Import all tokens + base styles */
@import '@rdna/radiants';

/* Import dark mode support */
@import '@rdna/radiants/dark';

Or import individual parts:

@import '@rdna/radiants/tokens';      /* Tokens only */
@import '@rdna/radiants/typography';  /* Typography styles */
@import '@rdna/radiants/fonts';       /* Font declarations */
@import '@rdna/radiants/animations';  /* Animation utilities */
@import '@rdna/radiants/base';        /* Base element styles */

React Components

import { Button, Card, Badge } from '@rdna/radiants/components/core';
import { useToast } from '@rdna/radiants/components/core';

function App() {
  return (
    <Card>
      <Badge variant="success">New</Badge>
      <Button variant="primary">Click me</Button>
    </Card>
  );
}

Available Components

  • Actions: Button, ContextMenu, DropdownMenu, Toggle, ToggleGroup, Toolbar
  • Layout: Card, Collapsible, Pattern, ScrollArea, Separator
  • Forms: Checkbox, Combobox, Input, InputSet, NumberField, Radio, Select, Slider, Switch, TextArea
  • Feedback: Alert, Badge, Meter, Spinner, Toast, Tooltip
  • Navigation: Breadcrumbs, Menubar, NavigationMenu, Tabs
  • Overlays: AlertDialog, Dialog, Drawer, Popover, PreviewCard, Sheet
  • Data Display: Avatar, CountdownTimer
  • Media: Icon

Hooks

import { useMotion } from '@rdna/radiants/hooks';

const { duration, easing } = useMotion();

Semantic Tokens

Use semantic token classes instead of hardcoded colors:

// ✅ Do this
<div className="bg-page text-main border-line">

// ❌ Not this
<div className="bg-[#FEF8E2] text-[#0F0E0C]">

Generated Figma Contracts

The authored sources of truth stay the same:

  • tokens.css
  • dark.css
  • components/core/*/*.meta.ts

Generate Figma-ready artifacts from those files with:

pnpm --filter @rdna/radiants generate:figma-contracts

Or run the full pipeline:

pnpm registry:generate

Generated outputs:

  • generated/figma/primitive/color.tokens.json
  • generated/figma/primitive/space.tokens.json
  • generated/figma/primitive/shape.tokens.json
  • generated/figma/primitive/motion.tokens.json
  • generated/figma/primitive/typography.tokens.json
  • generated/figma/semantic/semantic.tokens.json
  • generated/figma/contracts/*.contract.json

The generator also refreshes .component-contracts.example at the repo root. Copy it to .component-contracts, add FIGMA_ACCESS_TOKEN and FIGMA_FILE_KEY, then point agents to:

  • TOKENS_DIR=packages/radiants/generated/figma
  • CONTRACTS_DIR=packages/radiants/generated/figma/contracts

That matches the local Figma skills shipped in this repo, including .claude/skills/cc-figma-tokens/SKILL.md and .claude/skills/cc-figma-component/SKILL.md.

Token Categories

| Category | Examples | Purpose | |----------|----------|---------| | surface-* | bg-page | Backgrounds | | content-* | text-main | Text/foreground | | edge-* | border-line | Borders/outlines | | action-* | bg-accent | Interactive elements | | status-* | bg-success | Feedback states |

Dark Mode

Dark mode is activated by the .dark class — this is the only activation contract:

<!-- Enable dark mode -->
<html class="dark">

There is no prefers-color-scheme fallback. Consumers are responsible for toggling the .dark class (e.g. via a theme switch or reading the system preference in JS).

dark.css contains two things:

  1. Token overrides — semantic tokens flipped for dark backgrounds
  2. Component slot styling[data-slot]/[data-variant] selectors for Moon Mode interaction (glow instead of lift)

The generic class layer (.btn-*, .card, .badge-*, etc.) was removed. Use RDNA components or semantic tokens instead.

Fonts

This package includes:

  • Joystix Monospace — Heading font
  • PixelCode — Monospace/code font

Mondwest (body font) must be downloaded separately due to licensing:

  1. Purchase/download from Pangram Pangram
  2. Place Mondwest.woff2 and Mondwest-Bold.woff2 in your project's fonts directory
  3. The theme will fall back to system fonts if Mondwest is not available

Pixel Corners

Pixel-corner geometry (clip-path: polygon() staircase shapes) is generated from config, not handwritten.

Files:

  • scripts/pixel-corners.config.mjs — profiles (point arrays) and variant definitions
  • scripts/pixel-corners-lib.mjs — generator library
  • scripts/generate-pixel-corners.mjs — CLI that writes pixel-corners.generated.css
  • pixel-corners.css — shell file: imports generated CSS, contains manual utilities (shadows, focus rings, border overrides)
  • pixel-corners.generated.css — checked-in generated artifact (do not edit by hand)

Regenerate after config changes:

pnpm --filter @rdna/radiants generate:pixel-corners

Adding a new profile: Define TL corner points in the config (verify with the Pixel Corners Calculator), add innerPoints for the 1px-inset border boundary, then add a variant referencing the profile. The generator mirrors TL to TR/BR/BL automatically.

V1 boundaries: Per-corner composition is supported (any combination of profiles per corner slot). Runtime size-aware pixel corners (rounded-full as a pixel staircase) are not supported — rounded-full remains smooth CSS border-radius.

Internal Primitive Engine

Interactive primitives in this package use @base-ui/react internally for accessibility and keyboard/focus behavior. Public @rdna/radiants/components/core APIs remain stable.

Components backed by Base UI internals: Tabs, Dialog, Sheet, Popover, DropdownMenu, ContextMenu, Select, Tooltip, Toast, Checkbox, Switch, Slider.

Requirements

  • React 18+ or 19
  • Tailwind CSS 4
  • Next.js 14+ (optional)

License

GPL-3.0 — See LICENSE for details.

Note: The DNA specification itself is MIT licensed. This theme implementation is GPL-3.0.