UI

Badges

Badges are subtle elements to highlight information which are often used in tables and lists as well as in combination with metrics

Updatedliveincrease21.2%

Tremor exports two badge components:

  • Badge: Badge that can take text and/or icon element.

  • BadgeDelta: Badge with trend indicator for five different status.

import { Badge, BadgeDelta } from '@tremor/react';

Each badge component has five different sizes xs, sm, md, lg, and xl.

xs

live

sm

live

md

live

lg

live

xl

live

Composition of a simple KPI card using BadgeDelta combined with text elements.

Sales

+9.3%

$23,456

The example below shows a composition of different badges with our two Badge components.

Badge with Icon input

liveorderedwaitingoperationaldowntime

BadgeDelta with pre-defined status icons

texttexttexttexttext

client component
size
string
Set the component's width behavior.
icon
React.ReactElement
Set an icon.
color
Color
Sets the color of the badge.
tooltip
string
Set a tooltip on hover.

client component
size
string
Set the component's width behavior.
deltaType
string
Perceived degree of increase or decrease of delta value.
isIncreasePositive
boolean
Indicate wether positive change is interpreted as positive.
tooltip
string
Set a tooltip on hover.

Roundness
borderRadiustremor-full
Background color
colorstremor-brand-muted
Text color
colorstremor-brand-emphasis

Roundness
borderRadiustremor-full