Choicebox
more-shadcn-noair/choiceboxFreeComponent
A visual radio group for selecting complex options.
Live preview
live · rendered by the registry
Rendered by more-shadcn-noair on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://more-shadcn.noair.fun/r/choicebox.jsonSource
1<script lang="ts">2 import { cn } from '$UTILS$';3 import { setChoiceboxContext } from './ctx';4 import type { Snippet } from 'svelte';56 let {7 value = $bindable(),8 class: className,9 children,10 name,11 onValueChange12 }: {13 value?: string;14 class?: string;15 children: Snippet;16 name?: string;17 onValueChange?: (value: string) => void;18 } = $props();1920 setChoiceboxContext({21 activeValue: () => value,22 setActive: (v) => {23 value = v;24 if (onValueChange) {25 onValueChange(v);26 }27 }28 });29</script>3031<div class={cn('flex flex-col gap-3', className)} role="radiogroup" aria-label={name}>32 {@render children()}33 {#if name}34 <input type="hidden" {name} {value} />35 {/if}36</div>
What it pulls in
Other registry items
More from more-shadcn-noair
All 43 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Audioaudio | more-shadcn-noair | Components | Free | no deps | |
| Audio Waveaudio-wave | more-shadcn-noair | Components | Free | no deps | |
| Autocompleteautocomplete | more-shadcn-noair | Components | Free | no deps | |
| Bannerbanner | more-shadcn-noair | Components | Free | no deps | |
| Big Calendarbig-calendar | more-shadcn-noair | Components | Free | no deps | |
| Bottom Navigationbottom-nav | more-shadcn-noair | Components | Free | no deps | |
| Canvascanvas | more-shadcn-noair | Components | Free | no deps | |
| Chipchip | more-shadcn-noair | Components | Free | no deps |
