Components

Tag

Colored label for user-defined categories in the ten palette colors, with an optional remove button.

DesignResearchQ3

Usage

Use it to:

  • show categories, labels or select-option values the user created
  • edit a multi-value field with removable tags

Don’t use it to:

  • system statuses or counts (use Badge or StatusPill)
  • filters that toggle (use a Button or SegmentedControl)

Installation

Install the package (React 19):

terminal
npm install @krackedui/motion

Import the styles once, in your app entry or root layout:

/src/main.tsx
import '@krackedui/motion/styles.css';

Use it anywhere inside your app's <Theme> (see Installation):

/src/TagExample.tsx
import { useState } from 'react';
import { Tag } from '@krackedui/motion';

export function TagEditor() {
  const [tags, setTags] = useState(['Design', 'Research', 'Q3']);
  return (
    <div className="flex flex-wrap gap-1.5">
      {tags.map((t) => (
        <Tag key={t} color="purple" onRemove={() => setTags((all) => all.filter((x) => x !== t))}>
          {t}
        </Tag>
      ))}
    </div>
  );
}

Examples

Colors

default plus the ten palette colors (motionColors).

DefaultGrayBrownOrangeYellowGreenBluePurplePinkRedTeal

Size

SmallMedium

Dark theme

GrayOrangeGreenBluePink

API Reference

Tag

A <span>; supports all of its props. Adds:

PropTypeDefault
color
"default"Color
"default"
size
"sm""md"
"md"
onRemove
(event: MouseEvent<HTMLButtonElement>) => void
removeLabel
string
"Remove <text>"

motionColors

readonly MotionColor[]: default and the ten palette colors, in menu order.

PropTypeDefault

Accessibility

  • The tag is static text. The remove button is a separate, named button (“Remove Design”) reached with Tab and pressed with Enter / Space; it is 24×24 on touch screens.
  • Long labels truncate; pass title when the full text matters.
© 2026 Motion. Internal documentation.