- 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
Image
Image with aspect ratios and thumbhash placeholders
pnpm add @wandercom/design-system-web
7 lines
import { Image } from '@wandercom/design-system-web/ui/image';
export function Example() {
return (
<Image src="https://images.unsplash.com/photo-123" alt="Description" />
);
}Progressive loading with blurred placeholders:
5 lines
<Image
src="https://images.unsplash.com/photo-123"
alt="Description"
thumbhash="1QcSHQRnh493V4dIh4eXh1h4kJUI"
/>Placeholder fades out when image loads.
Loading example...
4 lines
<Image
aspectRatio="square"
src="https://images.unsplash.com/photo-1613914049786-b7e3e8323348?w=600&dpr=2&q=80"
/>Loading example...
4 lines
<Image
aspectRatio="portrait"
src="https://images.unsplash.com/photo-1613914049786-b7e3e8323348?w=600&dpr=2&q=80"
/>Loading example...
4 lines
<Image
aspectRatio="landscape"
src="https://images.unsplash.com/photo-1613914049786-b7e3e8323348?w=600&dpr=2&q=80"
/>Loading example...
4 lines
<Image
rounded="lg"
src="https://images.unsplash.com/photo-1613914049786-b7e3e8323348?w=600&dpr=2&q=80"
/>Loading example...
4 lines
<Image
rounded="xl"
src="https://images.unsplash.com/photo-1613914049786-b7e3e8323348?w=600&dpr=2&q=80"
/>aspectRatio
'square' | 'portrait' | 'landscape'
Aspect ratio constraint. 'square' (1:1), 'portrait' (3:4), 'landscape' (4:3).
rounded
'none' | 'lg' | 'xl'
border border-secondary radius. 'none' (0px), 'lg' (8px), 'xl' (12px). Defaults to 'lg'.
thumbhash
string
Thumbhash string for blurred placeholder while image loads.
asChild
boolean
Renders children and merges props.
className
string
Additional CSS classes applied to the wrapper `<div>` (controls aspect ratio, rounding, and box size).
imgClassName
string
Additional CSS classes applied to the inner `<img>` element.
wrapperStyle
CSSProperties
Inline styles applied to the wrapper. Use to size the box without affecting the inner `<img>`.
wrapperWidth
CSSProperties["width"]
Convenience shorthand for `wrapperStyle.width`.
wrapperHeight
CSSProperties["height"]
Convenience shorthand for `wrapperStyle.height`.
loadingAlt
string
Alt text for the decorative blur placeholder (aria-hidden). Defaults to "Loading image".
width / height
number | string
Forwarded to the inner `<img>` as standard HTML attributes (does not size the wrapper — use `wrapperWidth` / `wrapperHeight` for that).
style
CSSProperties
Forwarded to the inner `<img>` (use for `objectFit`, `objectPosition`, etc.).