components/example.tsx
1
2
import { Combobox } from "passport-ui";import { useState } from "react";components/example.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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" },]; function ComboboxExample() { const [value, setValue] = useState<string>(""); return ( <div className="w-sm"> <Combobox options={frameworks} value={value} onValueChange={setValue} placeholder="Select framework..." searchPlaceholder="Search frameworks..." emptyText="No framework found." /> </div> );}