mirror of
https://github.com/huntabyte/shadcn-svelte.git
synced 2026-09-14 19:33:46 +08:00
0a17af2ba7
Co-authored-by: AdrianGonz97 <31664583+AdrianGonz97@users.noreply.github.com>
1.6 KiB
1.6 KiB
title, description, component, links
| title | description | component | links |
|---|---|---|---|
| Select | Displays a list of options for the user to pick from—triggered by a button. | true |
Installation
{#snippet cli()} {/snippet} {#snippet manual()}Install bits-ui:
Copy and paste the component source files linked at the top of this page into your project.
{/snippet}Usage
<script lang="ts">
import * as Select from "$lib/components/ui/select/index.js";
</script>
<Select.Root type="single">
<Select.Trigger class="w-[180px]"></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>