Skip to content
SENVENLI UI

Tag group

A group of tags that can be removed or selected: features, filters, keywords.
A list of tags
import { TagGroup } from "@senvenli/react/selection";

Examples

Removable

Active filters: each tag has a remove button, and the group says when none are left.

Selectable

Tags that toggle, for picking several of a few.

Guidelines

When to use it

  • Showing or picking keywords, features or active filters.

Use something else when

  • The tag is an item's status. Badge

Accessibility

Keyboard

KeysWhat happens
Arrow keysMoves between tags.
Delete, BackspaceRemoves the focused tag.

Built in

  • Groups of three or more removable tags offer "Clear all".

You provide

  • A label for the group.

API reference

TagGroup

labelRequired
React.ReactNode
itemsRequired
readonly TagItem[]
onRemove
(keys: Key[]) => void

Makes tags removable (active filters); called with the keys removed.

selectionMode
"single" | "multiple"

Makes tags selectable (features, filters).

selectedKeys
readonly Key[]
defaultSelectedKeys
readonly Key[]
onSelectionChange
(keys: Key[]) => void
description
React.ReactNode
errorMessage
React.ReactNode
emptyState
React.ReactNode

What to show when there are no tags ("No filters").