Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
React Native docs
Data displayReact Native

Tag group

Show removable tags in a wrapping list.

Public APILumenTagGroupReact Native

Native example

Use Tag group

The host owns the tags and removes them in onRemove (value in React Native/Compose, id in SwiftUI).

Tag group rendered in the Expo web renderer Lumen playground

Captured exampleExpo web renderer

Open interactive preview
Open the Tag group demo
tsx
import { type LumenTag, LumenTagGroup } from '@santi020k/lumen-react-native'
import { useState } from 'react'

export function TopicTags() {
  const [tags, setTags] = useState<LumenTag[]>([
    { value: 'design', label: 'Design' },
    { value: 'native', label: 'Native' },
    { value: 'release', label: 'Release', removable: false }
  ])

  return (
    <LumenTagGroup
      label="Topics"
      tags={tags}
      onRemove={value => {
        setTags(current => current.filter(tag => tag.value !== value))
      }}
    />
  )
}
React Native
A host-owned list of topic tags where removable tags drop out of state and one tag stays pinned.

Reference

Public API

The primary shared and platform-specific options exposed by LumenTagGroup.

APIValues or typeDefaultDescription
tags / onRemove / removeLabeltags / removal callback / remove button namerequired / none / Remove {label}The host owns the tags and removes them in onRemove (value in React Native/Compose, id in SwiftUI).

Native behavior

Design and accessibility

When to use it

The host owns the tags and removes them in onRemove (value in React Native/Compose, id in SwiftUI).

Accessibility

Named group; remove buttons are named, and focus moves to a remaining removable tag or the group after removal.

Shared component

Available on other platforms

Apple / SwiftUIAndroid / Compose Web
React Native docsNative primitives