Destination Card
A place: its landscape, or its own icon on its own colour, with the name on a flat Steel Grey band.
Preview
Usage
tsx
import { DestinationCard, PlaceIcon } from "zostel-ui";
{/* the place's icon on its colour — colour and ink from /brand/places/index.json */}
<DestinationCard
name="Manali"
state="Himachal Pradesh"
colour="#AA5EA5"
illustration={<PlaceIcon slug="manali" variant="mono" color="#FFFFFF" size={88} />}
href="/destinations#manali"
/>
{/* or a picture */}
<DestinationCard name="Goa" state="Goa" imageUrl="/brand/scenes/waters.svg" hostelCount={2} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | — | The place. |
state | string | — | State, region or country. |
imageUrl | string | — | A cover: a photo of the stay, or its landscape (/brand/scenes/<family>.svg). Never stock photos. |
illustration | ReactNode | — | Shown on colour when there is no picture — a PlaceIcon. |
colour | string | — | The place’s colour behind the illustration. |
hostelCount | number | — | Shown as “n stays”. |
href | string | — | Makes the card a link. |
className | string | — | More classes, merged with the component’s own (tailwind-merge). |
nameType:
stringDefault: —
The place.
stateType:
stringDefault: —
State, region or country.
imageUrlType:
stringDefault: —
A cover: a photo of the stay, or its landscape (/brand/scenes/<family>.svg). Never stock photos.
illustrationType:
ReactNodeDefault: —
Shown on colour when there is no picture — a PlaceIcon.
colourType:
stringDefault: —
The place’s colour behind the illustration.
hostelCountType:
numberDefault: —
Shown as “n stays”.
hrefType:
stringDefault: —
Makes the card a link.
classNameType:
stringDefault: —
More classes, merged with the component’s own (tailwind-merge).