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

ds4-svelte

v0.1.1

Published

DS-4 — OX Design System for Svelte 5: tokens, presets, UI components. Material Design 3 styled, Zag.js powered.

Downloads

294

Readme

ds4-svelte

DS-4 — Design System for Svelte 5. Material Design 3 styled, Zag.js powered, fully typed, modular.

npm version License: MIT

Features

  • 100+ components ready out of the box (buttons, forms, layout, popups, tables, notifications, effects, shell)
  • Material Design 3 — opinionated visual baseline with color roles, elevation, shape tokens
  • Zag.js under the hood — ARIA roles, keyboard navigation, focus management for free on every interactive component
  • ModularsideEffects: false + subpath exports for tree-shake reliability
  • 6 themes out of the box (default, tinax, zapax, lc, bec, tt) via [data-theme="X"]
  • TypeScript — fully typed Props interfaces for every component

Install

pnpm add ds4-svelte
# or
npm install ds4-svelte
# or
yarn add ds4-svelte

Requirements

  • Node ≥ 20
  • Svelte ^5.0
  • Vite 5+ or SvelteKit 2+

Quick start

<script>
  import { OxButton } from 'ds4-svelte'
</script>

<OxButton variant="filled" onclick={() => alert('Hi DS-4')}>
  My first button
</OxButton>

Import the CSS base in your app.css (once):

@import 'ds4-svelte/src/design-system/tokens/themes.css';
@import 'ds4-svelte/src/design-system/presets/presets.css';
@import 'ds4-svelte/src/design-system/presets/components.css';

Pick a theme on <html>:

<html data-theme="default">
  <!-- default | tinax | zapax | lc | bec | tt -->
</html>

Philosophy

  • MD3 styled, not headless — components ship with Material 3 visuals by default. Customize via CSS tokens (--ox-*), not by rewriting HTML.
  • Color roles enforced — every --ox-X background has its --ox-on-X foreground twin. Contrast guaranteed system-wide.
  • Tree-shakablesideEffects: false + subpath exports let bundlers drop unused components.
  • Zag.js for behavior — Dialog, Combobox, Menu, Tabs, etc. all use Zag for ARIA + keyboard + focus management. No reinvention.

Components

| Category | Examples | |---------------|-----------------------------------------------------------------------| | Buttons | OxButton, OxSegment, OxSwitch, OxToggleGroup | | Forms | OxCheckbox, OxRadio, OxCombobox, OxNumberInput, OxPinInput | | Layout | OxAppShell, OxAppBar, OxNavigationDrawer, OxSplitter | | Popup | OxDialog, OxPopover, OxMenu, OxTooltip, OxHoverCard | | Tables | OxTable, OxEntityTable, OxTableGrouped | | Notifications | OxToaster (+ Timer + Terminal), OxBadge, OxChip | | Effects | OxConfetti, OxBacklight, OxAuroraText, OxWave, OxSplash | | Shell | OxAppShell — responsive AppBar + Sidebar + Toolbar |

Full list (100+) in src/index.ts.

Documentation

Live documentation site coming soon (see roadmap below).

For now, read the source — every component has a TypeScript interface Props at the top with JSDoc on each prop. The pattern is predictable across the library.

Import patterns

// Recommended — barrel import
import { OxButton, OxCard, OxDialog } from 'ds4-svelte'

// Subpath alternative
import { OxButton } from 'ds4-svelte/components'
import { OX, generateOXRootCSS } from 'ds4-svelte/tokens'

// Types
import type { OxShellNavItem, ButtonVariant } from 'ds4-svelte'

Theming

Override --ox-* CSS variables to customize. Each background token has its paired foreground for guaranteed contrast (MD3 color roles):

:root {
  --ox-primary: #6750A4;        /* background */
  --ox-on-primary: #FFFFFF;     /* text on primary bg */
  --ox-error: #DC2626;          /* error bg */
  --ox-on-error: #FFFFFF;       /* text on error bg */
}

For per-component customization, OxAppShell exposes 25 dedicated tokens (--ox-sidebar-*, --ox-appbar-*) for sidebar/appbar styling without :global() CSS overrides.

Roadmap

  • v0.1.x — initial release, core 100+ components, stabilization
  • v0.2.x — live documentation site (book) with Props tables and accessibility info per component
  • v0.3.x — Figma kit + design tokens sync
  • v1.0.0 — API frozen, semver guarantees

Contributing

See CONTRIBUTING.md for development setup, issue guidelines and PR process.

License

MIT © Axel Régnou