Docs
Select

Select

Displays a list of options for the user to pick from—triggered by a button.

Loading...

Installation

	npx shadcn-svelte add select

Usage

	<script lang="ts">
  import * as Select from "$components/ui/select";
</script>

<Select.Root>
  <Select.Trigger className="w-[180px]">
    <Select.Value placeholder="Theme" />
  </Select.Trigger>
  <Select.Content>
    <Select.Item value="light">Light</Select.Item>
    <Select.Item value="dark">Dark</Select.Item>
    <Select.Item value="system">System</Select.Item>
  </Select.Content>
</Select.Root>