Dynamic Select
more-shadcn-noair/dynamic-selectFreeComponent
A combobox-style select that allows users to pick from predefined options or enter a custom value.
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/dynamic-select.jsonSource
1<script lang="ts">2 import * as Popover from '$lib/components/ui/popover';3 import { setDynamicSelectContext } from './ctx';4 import type { Snippet } from 'svelte';56 let {7 value = $bindable(''),8 open = $bindable(false),9 children10 }: {11 value?: string;12 open?: boolean;13 children: Snippet;14 } = $props();1516 let inputValue = $state('');1718 setDynamicSelectContext({19 get value() {20 return { value };21 },22 get open() {23 return { value: open };24 },25 get inputValue() {26 return { value: inputValue };27 },28 setValue: (v: string) => {29 value = v;30 open = false;31 }32 });33</script>3435<Popover.Root bind:open>36 {@render children()}37</Popover.Root>
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 |
