Skip to content
Guide

Component catalogs with typed props

Treat each component like a mini product. Document props, states, and usage notes alongside the demo so designers and engineers share the same contract.

Example contract

type ButtonSpec = {
		variants: ["primary", "secondary", "ghost"];
		sizes: ["sm", "md", "lg"];
		states: ["default", "loading", "disabled"];
	};

Checklist

  • Keep props typed in +page.ts.
  • Document empty and loading states.
  • Include keyboard and focus rules.
  • Capture the default copy and microcopy once.
Built as a personal SvelteKit 5 lab with Supabase auth. Guides, patterns, and a playground you can actually ship.
Command Palette
Search for a command to run