Commands and strategies for testing sensory-ui components.
Commands and strategies for testing sensory-ui components from the shadcn registry.
| Command | Purpose |
|---|---|
bun run dev | Start dev server for interactive testing |
bun run build | Full production build |
bun run check | Biome/Ultracite lint |
bun run fix | Biome/Ultracite auto-fix |
npx tsc --noEmit | TypeScript compilation check |
bun run registry:build | Validate registry via shadcn build |
The fastest way to validate all modules:
npx tsc --noEmitThis checks:
sound props accept SoundRole | falsebun run devOpen http://localhost:3000 and use the interactive showcase to test:
interaction.tapinteraction.toggleinteraction.subtlenavigation.taboverlay.open/overlay.closeimport { Button } from "@/components/ui/sensory-ui/button";
// Default sound (interaction.tap)
<Button>Click me</Button>
// Custom sound
<Button sound="interaction.confirm">Confirm</Button>
// Silenced
<Button sound={false}>Silent</Button>import {
Dialog,
DialogTrigger,
DialogContent,
} from "@/components/ui/sensory-ui/dialog";
// Default (overlay.open on open, overlay.close on close)
<Dialog>
<DialogTrigger>Open</DialogTrigger>
<DialogContent>Content</DialogContent>
</Dialog>import {
Tabs,
TabsList,
TabsTrigger,
TabsContent,
} from "@/components/ui/sensory-ui/tabs";
// Default (navigation.tab on tab switch)
<Tabs defaultValue="tab1">
<TabsList>
<TabsTrigger value="tab1">Tab 1</TabsTrigger>
<TabsTrigger value="tab2">Tab 2</TabsTrigger>
</TabsList>
</Tabs><SensoryUIProvider config={{ enabled: false }}><SensoryUIProvider config={{ categories: { hero: false, notification: false } }}><SensoryUIProvider config={{ volume: 0.1 }}><SensoryUIProvider config={{ overrides: { "interaction.tap": "/sounds/custom/click.mp3" } }}># Validate GitHub registry
npx shadcn@latest registry validate SatyamVyas04/sensory-ui
# List all items
npx shadcn@latest list SatyamVyas04/sensory-ui
# View a specific item
npx shadcn@latest view SatyamVyas04/sensory-ui/sensory-ui-coreThe engine cancels previous sounds when a new sound is triggered rapidly:
This is handled by activePlayback tracking in engine.ts.
prefers-reduced-motion: reduce in browser dev tools → sounds suppressedreducedMotion: "force-off" → sounds suppressed regardless of OS settingreducedMotion: "force-on" → sounds play regardless of OS setting