Skip to content

Badge

Import from @falcon/ui-kit/dist/legacy, not @falcon/ui-kit.

Badge displays a small notification indicator either inline with text or positioned over another element.

Code
<div style={{ margin: "0 auto", width: "fit-content" }}>
<Badge>
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
</div>
Code
<div>
<Badge /> Just some long text with <Badge /> badges inside and around{" "}
<Badge />
</div>
Code
<div style={{ margin: "0 auto", width: "fit-content" }}>
<Badge text="18 New">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
</div>
Code
<FlexWrapper gap={20}>
<Badge size="regular" text="regular">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
<Badge size="small" text="small">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
<Badge>
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
</FlexWrapper>
Code
<div style={{ margin: "0 auto", width: "fit-content" }}>
<Badge positionOffset="100%">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
</div>
Code
<div
style={{
display: "grid",
gap: "20px",
gridTemplateColumns: "repeat(4, 1fr)",
}}
>
<span
style={{
alignItems: "center",
display: "inline-flex",
flexDirection: "column",
}}
>
<Typography className="mb-20" variant="h4">
danger
</Typography>
<span style={{ display: "inline-block" }}>
<Badge text="8" variant="danger">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
</span>
</span>
<span
style={{
alignItems: "center",
display: "inline-flex",
flexDirection: "column",
}}
>
<Typography className="mb-20" variant="h4">
info
</Typography>
<span style={{ display: "inline-block" }}>
<Badge text="8" variant="info">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
</span>
</span>
</div>
NameType/Description
classNamestring | undefined
positionOffsetstring | undefined
size = "regular"BadgeSize | undefined
styleCSSProperties | undefined
textstring | number | undefined
variant = "danger"BadgeVariant | undefined