Skip to content

Badge

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

Code
import { Badge, Icon } from "@falcon/ui-kit/dist/legacy";
export function Example() {
return (
<Badge>
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
);
}
Code
import { Badge } from "@falcon/ui-kit/dist/legacy";
export function Example() {
return (
<div>
<Badge /> Just some long text with <Badge /> badges inside and around{" "}
<Badge />
</div>
);
}
Code
import { Badge, Icon } from "@falcon/ui-kit/dist/legacy";
export function Example() {
return (
<Badge text="18 New">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
);
}
Code
import { Badge, Icon } from "@falcon/ui-kit/dist/legacy";
export function Example() {
return (
<div className="tw:flex tw:gap-5">
<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>
</div>
);
}
Code
import { Badge, Icon } from "@falcon/ui-kit/dist/legacy";
export function Example() {
return (
<Badge positionOffset="100%">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
);
}
Code
import { Badge, Icon } from "@falcon/ui-kit/dist/legacy";
export function Example() {
return (
<div className="tw:flex tw:gap-10">
<Badge text="danger" variant="danger">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
<Badge text="info" variant="info">
<Icon name="pack-mobile-app-inbox" size="32" />
</Badge>
</div>
);
}
children?: undefined | React.ReactNode
className?: string
positionOffset?: undefined | string
size?: BadgeSize = "regular"
style?: React.CSSProperties
text?: string | number
variant?: BadgeVariant = "danger"