Skip to content
ghostui

Preview

Research

Design guidance

Use tags for values that users can select or remove. Use Badge for read-only metadata. TagItem.Selectable works on its own; its leading plus changes to a check when selected. It uses the existing Checkbox behavior, including keyboard activation, native form values and controlled or uncontrolled state.

TagItem owns each tag's appearance, icon containers, selection indicators, removal and custom entry. TagGroup adds collection selection and limits through these same parts. TagInput keeps text entry, parsing and validation, while Combobox keeps chip navigation. The lower-level TagItem view and its parts remain available for those compositions.

The default filled style has a subtle surface and border. Outline uses Input background and border roles. Give remove actions accessible names. Selection and removal stay separate controls; removing an option does not also select it.

Removal appears on hover or keyboard focus by default, without reserving space at rest. Touch devices show the action directly. Set removeVisibility="always" on TagItem or TagItem.Selectable to keep it visible, as input-family chips do.

Installation

Install

Basic usage

Structures

Examples

Outline

Select an input-like outline tag. TagGroup uses this style by default.

Research

Base size

Both styles support the 32px base size. Each tag can be selected. The default small size is 28px; input hosts provide compact geometry for small tags.

ResearchProduct

Icon positions

Select tags with leading or trailing state icons. Both positions use the same fixed container: 24px in small tags and 28px in base tags. The 14px glyph stays centered inside it.

ResearchProduct

Without icons

Keep selection and keyboard behavior while showing the selected border alone.

Research

Selected check

Show a check only while selected. The tag remains selectable when the icon is absent.

Research

Controlled selection

Keep selection in the caller while using the same tag behavior and appearance.

Research

Always-visible removal

Set removeVisibility="always" to keep the named remove button visible. The caller owns the values and removes a tag when the button is pressed.

ResearchProduct

Selection and removal

Select a tag or remove it with its separate button. These tags hug their content at rest and grow when hover or keyboard focus reveals removal. Touch devices show the remove action directly.

ResearchProduct

Custom entry

Add a value with Enter or the Arrow Up button. Each value can then be selected or removed. The caller owns insertion and uniqueness; TagItem.Input owns the entry control and submission interaction.

Research

API reference