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

@hugodouchet/design-kit

v0.3.3

Published

A customizable design kit for SvelteKit with CSS variables and RGAA accessibility

Downloads

32

Readme

Design Kit

A customizable design kit for SvelteKit with Tailwind CSS, providing a set of reusable and easily customizable components following RGAA accessibility standards.

Features

  • 🎨 Svelte 5 - Built with the latest Svelte 5 runes syntax
  • 🎯 TypeScript - Fully typed components
  • 🌊 Tailwind CSS v4 - Using the new CSS-first configuration
  • RGAA Accessible - Follows French accessibility guidelines (WCAG 2.1 Level AA equivalent)
  • 📚 Storybook - Interactive component documentation
  • 📦 NPM Package - Easy to install and use in your projects

Installation

npm install @yourscope/design-kit

Prerequisites

This package requires:

  • Svelte 5+
  • SvelteKit 2+
  • Tailwind CSS 4.0+

Configuration

1. Install Tailwind CSS v4 in your project

If not already installed:

npm install -D tailwindcss@next @tailwindcss/vite@next

2. Configure Vite

Update your vite.config.js to add the Tailwind plugin:

import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [sveltekit(), tailwindcss()]
});

3. Import Tailwind in your application

In your src/app.css file:

@import 'tailwindcss';

Then import this file in your root layout (src/routes/+layout.svelte):

<script>
  import '../app.css';
</script>

<slot />

Usage

Basic Usage

<script>
  import { Button } from '@yourscope/design-kit';
</script>

<Button>My Button</Button>

With label prop

<Button label="My Button" />

Disabled button

<Button disabled>Disabled</Button>

With event handler

<script>
  function handleClick() {
    console.log('Button clicked!');
  }
</script>

<Button onclick={handleClick}>Click me</Button>

Button types

<Button type="submit">Submit</Button>
<Button type="reset">Reset</Button>

Customization

Currently, the Button uses a simple black background with white text style. Token-based customization will be added in future versions.

Available Components

Button

A simple button with black background and white text.

Props:

| Prop | Type | Default | Description | |------|------|---------|-------------| | label | string | - | Button text label (alternative to children) | | disabled | boolean | false | Disables the button | | type | 'button' \| 'submit' \| 'reset' | 'button' | HTML button type | | onclick | (event: MouseEvent) => void | - | Click event handler | | children | Snippet | - | Button content (slot) |

Accessibility:

  • Uses semantic <button> element (RGAA 7.1)
  • Includes aria-disabled attribute for screen readers (RGAA 7.1)
  • Visible focus indicator with ring (RGAA 10.7)
  • Keyboard accessible by default (RGAA 12.8)

Development

Install dependencies

npm install

Note: A prepare script automatically runs after installation to generate necessary SvelteKit files (svelte-kit sync).

Run Storybook

npm run storybook

Storybook will be accessible at http://localhost:6006 and allows you to view and test all components.

Accessibility Testing: Storybook includes the a11y addon which automatically checks for accessibility issues using axe-core. Click on the "Accessibility" tab in any story to view:

  • ✅ Violations (must be fixed)
  • ⚠️ Incomplete checks (need manual verification)
  • ✅ Passes (all good!)

Tip: If you encounter errors on first launch, make sure SvelteKit configuration files have been generated by running:

npm run prepare

Build the package

npm run build

Publish to npm

  1. Update the version in package.json
  2. Change the package name from @yourscope/design-kit to your npm scope
  3. Login to npm: npm login
  4. Publish: npm publish --access public

Troubleshooting

Error: Cannot find base config file "./.svelte-kit/tsconfig.json"

This error occurs when SvelteKit configuration files haven't been generated. Solution:

npm run prepare

or

npx svelte-kit sync

Storybook won't start

If Storybook doesn't start properly:

  1. Verify all dependencies are installed: npm install
  2. Generate SvelteKit files: npm run prepare
  3. Restart Storybook: npm run storybook

Error with Tailwind CSS v4

Make sure you have the correct versions installed:

npm install -D tailwindcss@next @tailwindcss/vite@next

And that your vite.config.js contains the Tailwind plugin:

import tailwindcss from '@tailwindcss/vite';
plugins: [sveltekit(), tailwindcss()]

Accessibility (RGAA)

This design kit follows RGAA 4.1 standards (French accessibility guidelines equivalent to WCAG 2.1 Level AA).

Key Accessibility Features

  • Semantic HTML: All components use appropriate HTML elements
  • ARIA Attributes: Screen reader support with proper ARIA attributes
  • Keyboard Navigation: All interactive elements are keyboard accessible
  • Focus Indicators: Visible focus indicators for keyboard users
  • Color Contrast: Text meets minimum contrast ratios (4.5:1)

RGAA Compliance

| Component | RGAA Criteria | Status | |-----------|---------------|--------| | Button | 7.1, 10.7, 12.8 | ✅ Compliant |

For more information on RGAA: https://accessibilite.numerique.gouv.fr/

Contributing

Please read AGENTS.md for guidelines on:

  • Code style and conventions
  • Accessibility requirements (RGAA)
  • Language requirements (English)
  • Component structure
  • Testing procedures

License

MIT