- Accordion
- Avatar
- Badge
- Breadcrumb
- Button
- Calendar
- ChatContainer
- ChatInput
- ChatMessage
- ChatMultiChoiceQuestion
- ChatMultiOptionQuestion
- ChatThinking
- Checkbox
- Combobox
- Container
- CurrencyInput
- DistributionSlider
- Drawer
- Dropdown
- FilePicker
- Grid
- Heading
- Image
- Input
- InputGroup
- Label
- Logo
- MapPin
- Markdown
- Modal
- NativeSelect
- NumberInput
- OptionSlider
- OtpInput
- PhoneInput
- Popover
- Progress
- PropertyCalendar
- RadioGroup
- RadioGroupCards
- ResponsiveModal
- ScrollArea
- SearchBar
- SearchBarFallback
- SearchInput
- Select
- Separator
- Spinner
- Switch
- Table
- Tabs
- Text
- Textarea
- TimePicker
- Toast
- Toggle
- ToggleCard
- ToggleGroup
- Toolbar
- Tooltip
ToggleCard
A large, selectable card with an icon, title, and description. Multi-select via ToggleCardGroup, or standalone as a single on/off card.
pnpm add @wandercom/design-system-web
import {
ToggleCard,
ToggleCardGroup,
} from '@wandercom/design-system-web/ui/toggle-card';
import { useState } from 'react';
export default function ToggleCardExample() {
const [value, setValue] = useState<string[]>([]);
return (
<ToggleCardGroup value={value} onChange={setValue}>
<ToggleCard
value="ICONIC"
icon={<IconCrown />}
title="Iconic"
description="Exceptional properties unlike any other"
/>
<ToggleCard
value="PREMIER"
icon={<IconDiamond />}
title="Premier"
description="Top-rated stays with premium amenities"
/>
</ToggleCardGroup>
);
}ToggleCardGroup is checkbox-style: it holds an array of selected values, so the
user can select any number of cards — including just one. Each card only needs a
unique value; selection state flows through the group.
<ToggleCardGroup value={value} onChange={setValue}>
<ToggleCard value="ICONIC" icon={<IconCrown />} title="Iconic" description="Exceptional properties unlike any other" />
<ToggleCard value="PREMIER" icon={<IconDiamond />} title="Premier" description="Top-rated stays with premium amenities" />
<ToggleCard value="FAVORITE" icon={<IconStar />} title="Favorite" description="Highly rated by recent guests" />
</ToggleCardGroup>Use a ToggleCard on its own for a single on/off card. Control it with
pressed / onPressedChange (or defaultPressed for uncontrolled use).
<ToggleCard
pressed={enabled}
onPressedChange={setEnabled}
icon={<IconBell />}
title="Notifications"
description="Get updates about new properties"
/><ToggleCard disabled icon={<IconStar />} title="Unavailable" description="This option is currently unavailable" /><ToggleCard title="Flexible layout" description="A simple card layout without leading artwork" /><ToggleCard title="Title only" />The icon is a ReactNode rendered shrink-0; the caller controls its size.
Cards typically use 20px or 24px icons.
<ToggleCard value="ICONIC" icon={<IconCrown className="size-6" />} title="Iconic" />value:
onChange:
children:
className?:
The group also accepts the standard div attributes (e.g. id, aria-label).
Extends the Radix Toggle root props (e.g. pressed, defaultPressed, onPressedChange, disabled).
value?:
icon?:
title:
description?:
pressed?:
onPressedChange?:
disabled?:
className?:
classNames?:
ToggleCard is built on the Radix Toggle primitive, so each card is a button
that exposes aria-pressed (checkbox-style toggle semantics) — whether
standalone or inside a group.
Keyboard interaction:
Tab- Move focus to the next cardSpace/Enter- Toggle the focused card
ToggleCardGroup wraps its cards in a container with role="group". Provide an
accessible name with aria-label or aria-labelledby when the group needs one.