Skip to content

Tag group

Shows a group of tags that you can select or remove.

Topics
Design
Engineering
Research
tag-group-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Composition

  • TagGroup

    Owns selection and removal. Set onRemove to show remove buttons.

    • TagGroupLabel
    • TagListView

      Set renderEmptyState to show a message when there are no tags.

      • TagRepeats

        Its text stays on one line.

    • TagGroupDescriptionOptional
    • TagGroupErrorOptional

Selection

Set selectionMode="multiple" to use tags as filters. A disabled tag cannot be selected.

Amenities
Wi-Fi
Parking
Pool
Gym
Pets allowed
Breakfast
2 filters on.
tag-group-selection-demo.tsx

Sizes

Filters
Open
Assigned to me
High priority
Filters
Open
Assigned to me
High priority
Filters
Open
Assigned to me
High priority
tag-group-sizes-demo.tsx

API reference

vip/ui adds or changes the props below. For all other props, see React Aria TagGroup (opens in a new tab).

size: "xs" | "sm" | "md" = "md"
Sets the size of each tag and its remove button. A size on a tag overrides it.