SDAIA
SDAIA LogoSDAIA Logo
ComponentsChip
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

Chip

Compact interactive element for tags, filters, and selections. Available in Soft and Solid styles, three sizes, rounded shape, selected and disabled states.

Loading preview…
1const [selected, setSelected] = useState(new Set(['Electronics', 'Laptops', 'SAR 500–2000', 'Apple']));
2
3{FILTER_GROUPS.map(group => (
4 <div key={group.label}>
5 <p className="mb-2 text-[11px] font-[600] tracking-[0.06em] ...">{group.label}</p>

Installation

npx sdaia-ui@latest add chip

Usage

import { Chip } from "@/components/ui/chip"
<Chip style="soft" size="medium" />

Examples

Soft

Chip in the default soft style.

Loading preview…
1<Chip variant="soft">Filter</Chip>

Solid

Chip with a solid filled background.

Loading preview…
1<Chip variant="solid">Filter</Chip>

Rounded

Chip with fully rounded corners.

Loading preview…
1<div className="flex flex-wrap gap-2 items-center">
2 <Chip rounded>Pill</Chip>
3 <Chip rounded={false}>Rounded</Chip>
4</div>

Selected

Chip in the selected state.

Loading preview…
1<Chip variant="soft" selected>Filter</Chip>

Sizes

Chip available in Large, Medium, and Small sizes.

Loading preview…
1<div className="flex flex-wrap gap-2 items-center">
2 <Chip size="lg">Large</Chip>
3 <Chip size="md">Medium</Chip>
4 <Chip size="sm">Small</Chip>
5</div>

Disabled

Chip in the disabled state, preventing interaction.

Loading preview…
1<Chip variant="soft" disabled>Filter</Chip>

Neutral

Low-emphasis chip used for neutral tags and metadata.

Loading preview…
1<Chip variant="neutral">Neutral</Chip>

Outline

Outlined chip variant used for secondary filters and inactive selections.

Loading preview…
1<Chip variant="outline">Outline</Chip>

API Reference

ChipProps

Props for the Chip component.

Prop

Type

Default

Required

variant

'soft' | 'solid' | 'neutral' | 'outline'

'soft'

optional

size

'sm' | 'md' | 'lg'

'md'

optional

rounded

boolean

true

optional

disabled

boolean

false

optional

selected

boolean

false

optional

leadingIcon

ReactNode

-

optional

trailingIcon

ReactNode

-

optional

onLeadingIconClick

(e: MouseEvent<HTMLSpanElement> | KeyboardEvent<HTMLSpanElement>) => void

-

optional

onTrailingIconClick

(e: MouseEvent<HTMLSpanElement> | KeyboardEvent<HTMLSpanElement>) => void

-

optional

trailingIconLabel

string

'Remove'

optional

leadingIconLabel

string

-

optional

avatar

boolean

false

optional

avatarSrc

string

'/images/avatar.webp'

optional

as

ElementType

'button'

optional

children

ReactNode

-

optional
Chart
Code Snippet
On this page

Filter Results

2,340 products

CATEGORY

PRICE RANGE

BRAND

4 filters applied