import { Combobox, ComboboxWithIcons } from '@hanzo/ui'
A button trigger shows the picked framework and drops a searchable list; picking the same row again clears it.
export function Default() {const [value, setValue] = useState("")return (<Combobox options={frameworks} value={value} onChange={setValue} placeholder="Select framework..." searchPlaceholder="Search framework..." emptyText="No framework found." />)}
Each option, and the trigger once one is picked, carries a leading glyph.
export function WithIcons() {const [value, setValue] = useState("todo")return (<XStack items="center" gap="$4"><Text color="$quiet" fontSize="$3">Status</Text><ComboboxWithIcons options={statuses} value={value} onChange={setValue} placeholder="Set status..." searchPlaceholder="Change status..." width={160} /></XStack>)}
The trigger reports itself unusable and the panel never opens.
export function Disabled() {return (<Combobox options={frameworks} placeholder="Select framework..." disabled />)}
export type ComboboxOption = {value: stringlabel: string}
export type ComboboxProps = Omit<ComponentProps<typeof PopoverContent>, 'children' | 'onChange'> & {options: ComboboxOption[]value?: stringonChange?: (value: string) => voidplaceholder?: stringsearchPlaceholder?: stringemptyText?: stringdisabled?: boolean}
export type ComboboxIconOption = ComboboxOption & {icon: ComponentType<{ size?: number }>}
export type ComboboxWithIconsProps = Omit<ComboboxProps, 'options'> & {options: ComboboxIconOption[]}