"use client"
import { useState } from "react"
import type { Key, Selection } from "react-aria-components"
import { MultipleSelect } from "@/components/ui/preskok-ui/multiple-select"
const items = [
{ id: "design", textValue: "Design" },
{ id: "frontend", textValue: "Frontend" },
{ id: "backend", textValue: "Backend" },
{ id: "docs", textValue: "Docs" },
]
export function MultipleSelectPreskokDemo() {
const [selectedKeys, setSelectedKeys] = useState<Selection>(new Set<Key>())
return (
<div className="min-w-64">
<MultipleSelect
label="Labels"
placeholder="Search labels..."
items={items}
selectedKeys={selectedKeys}
onSelectionChange={setSelectedKeys}
/>
</div>
)
}
Installation
CLI
Manual
pnpmnpmyarnbunpnpm dlx @preskok-org/ui@latest add multiple-select
Usage
import { MultipleSelect } from "@/registry/preskok/ui/preskok-ui/multiple-select"
export function MultipleSelectDemo() {
return <MultipleSelect label="Labels" items={[]} />
}