SDAIA
SDAIA LogoSDAIA Logo
ComponentsBadge
IntroductionInstallationFAQBrands
ColorsTypographySpacingRadiusGrid layoutsAll Tokens
All Components
AccordionActivityArea ChartAudio PlayerAvatarAvatarGroupCarousel ImageChartChipCode SnippetColumn ChartContext MenuDigital StampDividerDonut ChartDraggable ListDropdownEmpty StateFiltrationFooterImage ViewerLine ChartListMedia GalleryMenuMetricNav BarNav HeaderNumberPDF ViewerPie ChartPopoverProgress CircleQuoteRadial StepperScatterSecond Nav HeaderSlideout MenuStructured ListTableTable of ContentTree ViewVertical TabsVideo Player
BreadcrumbButtonButton MenuButton SplitContent SwitcherDate PickerFloating ButtonHorizontal TabsLinkModalPaginationRadio ButtonSwitchTag
AutocompleteCheckboxFile UploadNumber InputRange SliderRich Text EditorSelectSignatureSliderText AreaText Input
AlertsBadgeCardFeedbackFeedback OverviewHelp IconLoading IndicatorNotification BannerNotification PopupNotificationsProgress BarRatingRating OverviewSkeletonSkeleton/AvatarsTooltip
Sdaia Logo Animation
Sdaia Touch ButtonsSdaia Touch Switch

Badge

Displays a badge or a component that looks like a badge.

Loading preview…
1'use client';
2
3import { Badge } from 'sdaia-ui';
4
5const NOTIFICATIONS = [

Installation

npx sdaia-ui@latest add badge

Usage

import { Badge } from "@/components/ui/badge"
<Badge>Label</Badge>

Examples

Size

Use the `size` prop to change the size of the badge.

Loading preview…
1'use client';
2
3import { Badge } from 'sdaia-ui';
4import AlertCircleSVG from '@/public/react-svgs/AlertCircleSVG';
5

Default

The default Soft badge with Neutral colour.

Loading preview…
1'use client';
2
3import { Badge } from 'sdaia-ui';
4import AlertCircleSVG from '@/public/react-svgs/AlertCircleSVG';
5

Solid

Use `style="Solid"` for a high-contrast filled badge.

Loading preview…
1'use client';
2
3import { Badge } from 'sdaia-ui';
4import AlertCircleSVG from '@/public/react-svgs/AlertCircleSVG';
5

Primary

Use `color="Primary"` to apply the brand primary colour.

Loading preview…
1'use client';
2
3import { Badge } from 'sdaia-ui';
4import AlertCircleSVG from '@/public/react-svgs/AlertCircleSVG';
5

Destructive

Use `color="Error"` to signal a critical or error condition.

Loading preview…
1'use client';
2
3import { Badge } from 'sdaia-ui';
4import AlertCircleSVG from '@/public/react-svgs/AlertCircleSVG';
5

Pill

Use `pill={true}` for a fully rounded pill-shaped badge.

Loading preview…
1'use client';
2
3import { Badge } from 'sdaia-ui';
4import AlertCircleSVG from '@/public/react-svgs/AlertCircleSVG';
5

Icon

Use `iconOnly={true}` to render the badge with an icon and no label.

Loading preview…
1'use client';
2
3import { Badge } from 'sdaia-ui';
4import AlertCircleSVG from '@/public/react-svgs/AlertCircleSVG';
5

API Reference

BadgeProps

Props for the Badge component.

Prop

Type

Default

Required

children

ReactNode

-

optional

size

'sm' | 'md' | 'lg'

'md'

optional

variant

'soft' | 'solid'

'soft'

optional

color

'neutral' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'warning' | 'error'

'neutral'

optional

pill

boolean

false

optional

iconOnly

boolean

false

optional

leadingIcon

ReactNode

-

optional

trailingIcon

ReactNode

-

optional
Alerts
Card
On this page
SDAIA Admin
DashboardDatasetsReports

Dataset approval requested

Population Census 2024 needs your review

Action needed2m ago

New comment on Q1 Report

Sarah Ahmed mentioned you in a thread

New14m ago

Pipeline failed

Healthcare Claims sync stopped at step 3

Failed1h ago

API key expiring soon

Production key expires in 7 days

Warning3h ago

Data export completed

Tourism Visitors dataset is ready to download

CompletedYesterday
Showing 5 of 12
LabelLabelLabel
Label
Label
Label
Label
Label