Traken UI

Badge

Displays small status indicators or notifications, customizable in color, size, style, and position to match your design.


Notification Variants

3
7

Variants

Solid
Flat
Faded
Shadow

Colors

Primary
Secondary
Success
Warning
Danger

Sizes

sm
md
lg

Radius

sm
md
lg
xl
full

Badge With React Node

New

Features

  • Versatile usage with any element or component
  • Supports text, number, or custom node as content
  • Multiple color, size, and variant options
  • Configurable border radius and placement
  • Fully accessible and extendable

Props

PropTypeDefaultDescription
childrenReact.ReactNodeThe element to which the badge will be attached.
classNamestringCustom class name for additional styling.
color"base" | "primary" | "secondary" | "success" | "warning" | "danger"Color theme of the badge.
size"sm" | "md" | "lg"Size of the badge.
rounded"sm" | "md" | "lg" | "xl" | "full"Border radius of the badge.
placement"topRight" | "topLeft" | "bottomRight" | "bottomLeft"Position of the badge relative to the children.
variant"solid" | "flat" | "faded" | "shadow"Visual style of the badge.
contentstring | number | React.ReactNodeThe content to be displayed inside the badge.
...propsReact.HTMLAttributes<HTMLSpanElement>

On this page