Skip to content
  • Android
  • iOS
  • Web

Badge

A Badge component is a small UI element used to display a count, status, or label associated with another element, such as an icon or button. Badges are commonly used to highlight notifications, messages, or any relevant information in a compact and visually distinct way, often appearing as small circles or rectangles with numbers or text.

Live examples

Example.tsx

Attributes

NBadge attributes
NameTypeDefaultDetails
childrenReactNodeOptional
colorstringdefaultUse default, accent, success, warning, or danger.
variantstringsoftUse primary, secondary, or soft.
sizestring | numbermdUse sm, md, or lg.
classNamestringOptionalSupported Tailwind-style utilities, resolved entirely in Rust. See the engine README.
rolestringOptional
Engine reference for BadgeSet up engine components

Tags