Skip to content

Select

Select is part of the Forms and selection group. Dropdown value picker for one option from a finite list.

Terminal window
npx bambiui add select --framework react
Terminal window
npx bambiui add select --framework solid
Terminal window
npx bambiui add select --framework svelte
Terminal window
npx bambiui add select --framework vue
import { Select, SelectTrigger, SelectValuePart, SelectContent, SelectItem } from "@/components/ui/select";
export function Example() {
return <Select />;
}
import { Select, SelectTrigger, SelectValuePart, SelectContent, SelectItem } from "~/components/ui/select";
export function Example() {
return <Select />;
}
<script lang="ts">
import { Select, SelectTrigger, SelectValuePart, SelectContent, SelectItem } from "$lib/components/ui/select";
</script>
<Select />
<script setup lang="ts">
import { Select, SelectTrigger, SelectValuePart, SelectContent, SelectItem } from "@/components/ui/select";
</script>
<template>
<Select />
</template>
Select preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.

Use when the list is known and too long for radio buttons.

Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.

Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Select. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.

Select, SelectTrigger, SelectValuePart, SelectContent, SelectItem

Customize tokens after installing and previewing the component. Relevant tokens include:

  • --bambi-background
  • --bambi-foreground
  • --bambi-border
  • --bambi-ring