Components
Loading preview...
Here is Tag Group component
@jollyshopland
npx shadcn@latest add https://21st.dev/r/jollyshopland/tag-groupimport React from "react"
import type { Selection } from "react-aria-components"
import { Label } from "@/components/ui/text-field-basic"
import { Tag, TagGroup, TagList } from "@/components/ui/tag-group"
export default function TagGroupSelection() {
let [selected, setSelected] = React.useState<Selection>(new Set(["parking"]))
return (
<TagGroup
className="space-y-1"
selectionMode="multiple"
selectedKeys={selected}
onSelectionChange={setSelected}
>
<Label>Amenities</Label>
<TagList>
<Tag id="laundry">Laundry</Tag>
<Tag id="fitness">Fitness center</Tag>
<Tag id="parking">Parking</Tag>
<Tag id="pool">Swimming pool</Tag>
<Tag id="breakfast">Breakfast</Tag>
</TagList>
</TagGroup>
)
}