Multi-Select

Previous Next

A multi-select input that emulates the Shadcn Select component as closely as possible.

Installation

pnpm dlx shadcn-svelte@latest add https://wds-shadcn-registry-svelte.netlify.app/registry/multi-select.json

Usage

<script lang="ts">
	import { MultiSelect } from '$lib/components/multi-select';
 
	const frameworks = [
		{ value: 'next.js', label: 'Next.js' },
		{ value: 'sveltekit', label: 'SvelteKit' },
		{ value: 'nuxt.js', label: 'Nuxt.js' },
		{ value: 'remix', label: 'Remix' },
		{ value: 'astro', label: 'Astro' },
		{ value: 'vue', label: 'Vue.js' },
		{ value: 'react', label: 'React' }
	];
 
	let value = $state<string[]>([]);
</script>
 
<MultiSelect
	bind:value
	items={frameworks}
	placeholder="Select frameworks..."
	placeholderSearch="Search frameworks..."
	emptySearchMessage="No frameworks found"
	overflowBehavior="wrap-when-open"
	disableSearch
	class="w-[400px]"
/>

Examples

Customize Badges

Overflow Behavior

Search Configuration

Form