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

@slimkhemiri/react-design-system

v0.1.13

Published

React bindings for the **Slim Design System** (Stencil Web Components).

Readme

@slimkhemiri/react-design-system

React bindings for the Slim Design System (Stencil Web Components).

This package provides:

  • React components like SlimButton, SlimInput, …

Install

npm i @slimkhemiri/react-design-system

This package depends on @slimkhemiri/web-components and @slimkhemiri/tokens (installed automatically).

// App.tsx
import { SlimButton, SlimInput } from "@slimkhemiri/react-design-system";

export function App() {
  return (
    <div style={{ display: "grid", gap: 12, maxWidth: 360 }}>
      <SlimInput label="Email" type="email" onSlimChange={(e) => console.log(e.detail)} />
      <SlimButton variant="primary">Click me !</SlimButton>
    </div>
  );
}

## Components

Currently exported:

- `SlimAlert` - Info, success, warning, and danger alerts
- `SlimBadge` - Status badges with multiple variants
- `SlimButton` - Primary, secondary, ghost, and danger buttons with loading states
- `SlimCheckbox` - Checkbox input (`onSlimChange` → `CustomEvent<boolean>`)
- `SlimInput` - Text input with validation (`onSlimChange` → `CustomEvent<string>`)
- `SlimSelect` - Dropdown select (`onSlimChange` → `CustomEvent<string>`)
- `SlimSwitch` - Toggle switch (`onSlimChange` → `CustomEvent<boolean>`)
- `SlimTextarea` - Multi-line text input (`onSlimChange` → `CustomEvent<string>`)
- `SlimTooltip` - Contextual tooltip with multiple placements
- `SlimPlaygroundSidebar` - Collapsible sidebar navigation

## Design Tokens

Access design tokens in JavaScript for dynamic styling:

```tsx
import { tokens } from "@slimkhemiri/tokens";

// Access base (light theme) tokens
const primaryColor = tokens.base['--sl-primary']; // "#581d74"
const spacing = tokens.base['--sl-space-4']; // "16px"

// Access theme-specific tokens
const darkSurface = tokens.themes.dark['--sl-surface']; // "#0b1220"
const hcPrimary = tokens.themes.hc['--sl-primary']; // "#fff"

// Use in your components
function MyComponent() {
  return (
    <div style={{ 
      padding: spacing,
      backgroundColor: primaryColor 
    }}>
      Custom styled content
    </div>
  );
}

CSS Variables

All tokens are also available as CSS variables:

.my-component {
  /* Colors */
  background: var(--sl-primary);
  color: var(--sl-primary-contrast);
  
  /* Spacing */
  padding: var(--sl-space-4);
  
  /* Typography */
  font-size: var(--sl-font-size-2);
  
  /* Border Radius */
  border-radius: var(--sl-radius-1);
  
  /* Transitions */
  transition: all var(--sl-duration-fast);
}

Theming

The design system supports three themes: Light (default), Dark, and High Contrast.

// Change theme dynamically
document.documentElement.dataset.theme = 'dark'; // or 'hc' for high contrast

Resources