Tag

Metadata pills: 28px, raised and ringed, with an optional icon and remove circle.

View source
gpt-5claude-sonnet-4-5Oct 12Activecheckout
import { Tag } from "@logicplanes/kaeso-ui";

Props

  • children
    ReactNode

    The tag's text.

  • icon
    IconSvgElement

    An icon before the text.

  • invalid
    boolean

    Marks a value that isn't accepted: a red ring, red text and an error icon named "Not accepted", so it doesn't rest on color.

  • onClick
    ((e: MouseEvent<HTMLElement, MouseEvent>) => void)

    Renders a button with the control's hover, press and focus: raised tags take the secondary button's material, outline tags the ghost's.

  • onRemove
    ((e: MouseEvent<HTMLButtonElement, MouseEvent>) => void)

    Shows a remove circle; called with the click.

  • pressed
    boolean

    For toggle pills (DisplayOptions): sets aria-pressed, and true draws the selected soft fill whatever the variant, so a toggle needs no variant swap.

  • removeLabel
    string

    The remove circle's accessible name. Defaults to "Remove" and the label in the provider's language.

  • size
    "md" | "sm" = md

    The tag's height.

  • variant
    "outline" | "soft" | "raised" = raised

    Raised on the panel, soft fill, or outlined.