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

@structyl/styled

v1.2.0

Published

Tailwind CSS v4 styled React components built on accessible WAI-ARIA primitives, with a token-driven theme preset and type-safe variants.

Readme

@structyl/styled

The Tailwind-styled component layer for structyl — accessible behavior, ready-to-use styling.

npm license

@structyl/styled pairs the headless, WAI-ARIA primitives from @structyl/primitives with a polished Tailwind CSS v4 styling layer. Every component is themable through CSS-variable design tokens, variants are type-safe via tailwind-variants, and the compound (dot-notation) API mirrors Radix. It is the drop-in styled tier of structyl for teams that want accessible components without building the design layer themselves.

Installation

# pnpm
pnpm add @structyl/styled

# npm
npm install @structyl/styled

# yarn
yarn add @structyl/styled

Peer dependencies: react, react-dom (18 or 19) and tailwindcss (3.4+ or 4).

Add the theme preset to your Tailwind config so the design tokens and component styles resolve:

// tailwind.config.ts
import type { Config } from 'tailwindcss';
import structylPreset from '@structyl/styled/tailwind-preset';

export default {
  presets: [structylPreset],
  content: [
    './src/**/*.{ts,tsx}',
    './node_modules/@structyl/styled/dist/**/*.{js,mjs}',
  ],
} satisfies Config;

Usage

Simple components are named exports; multi-part components use the compound dot-notation API.

import { Button, Dialog } from '@structyl/styled';

export function Example() {
  return (
    <Dialog.Root>
      <Dialog.Trigger asChild>
        <Button variant="default" size="lg">
          Open dialog
        </Button>
      </Dialog.Trigger>

      <Dialog.Portal>
        <Dialog.Overlay />
        <Dialog.Content>
          <Dialog.Header>
            <Dialog.Title>Delete project</Dialog.Title>
            <Dialog.Description>
              This action cannot be undone.
            </Dialog.Description>
          </Dialog.Header>

          <Dialog.Footer>
            <Dialog.Close asChild>
              <Button variant="outline">Cancel</Button>
            </Dialog.Close>
            <Button variant="destructive" loading loadingText="Deleting…">
              Delete
            </Button>
          </Dialog.Footer>
        </Dialog.Content>
      </Dialog.Portal>
    </Dialog.Root>
  );
}

The imperative toast API is also exported directly:

import { Toaster, toast } from '@structyl/styled';

function App() {
  return (
    <>
      <Toaster />
      <button onClick={() => toast({ title: 'Saved', description: 'Your changes are live.' })}>
        Save
      </button>
    </>
  );
}

Features

  • Accessible by default — built on @structyl/primitives, conforming to WAI-ARIA APG patterns with full keyboard support.
  • Tailwind CSS v4 styling — a shipped tailwind-preset wires up design tokens, dark mode, and animation utilities.
  • Runtime theming — colors and surfaces are driven by CSS variables, so themes can change at runtime via @structyl/themes.
  • Type-safe variantsvariant, size, and color props are powered by tailwind-variants with exported *Variants helpers (e.g. buttonVariants).
  • Compound component API — multi-part components use dot-notation namespaces (Dialog.Root, Select.Trigger, Tabs.List, …).
  • asChild composition — interactive components forward behavior to a child element via the Slot pattern.
  • Imperative toaststoast(), useToast(), and <Toaster /> for fire-and-forget notifications.
  • RSC compatible — client components are marked 'use client' and tested in the Next.js App Router.

API

The package re-exports a large catalog of components. Highlights:

| Export | Kind | Description | | --- | --- | --- | | Button, ButtonGroup | Named | Action button with variant, size, color, loading, and icon props. | | Input, Textarea, Label, Checkbox, Switch, Slider | Named | Form atoms. | | Dialog, AlertDialog, Sheet, Drawer | Compound | Modal overlays. | | Popover, Tooltip, HoverCard | Compound | Floating surfaces. | | DropdownMenu, ContextMenu, Menubar, NavigationMenu | Compound | Menus and navigation. | | Select, MultiSelect, Combobox, Command | Compound | Selection and command palettes. | | Tabs, Accordion, Collapsible, Stepper, Breadcrumb | Compound | Disclosure and navigation. | | Toast, Toaster, toast, useToast | Mixed | Declarative and imperative notifications. | | Calendar, DatePicker, DateRangePicker, TimePicker, DateTimePicker | Mixed | Date and time pickers. | | Table, Chart, Timeline, Stat, Rating, Typography | Mixed | Data display and content. | | buttonVariants, alertVariants | Function | tailwind-variants helpers for composing class names. |

Component prop types are re-exported alongside each component (for example ButtonProps, DialogContentProps, SelectRootProps). See the full reference for every export and prop.

Part of structyl

This package is part of structyl — the React UI library with structure. Full documentation lives at www.structyl.com.

License

MIT