Skip to Content
Urban Cowboy
Components

BuildingIcon

Figma-derived building silhouettes used to illustrate room and lodging-family cards.

BuildingIcon renders one of ten building silhouettes as a CSS mask filled with a theme colour. It is decorative: the outer element carries a role="img" and an accessible label, while the coloured mask itself is hidden from assistive technology. The component is used across room cards and lodging-family merchandising to give each place a recognisable shape.

string
string

Variants and colours

The former Storybook AllFigmaVariants and AllColors states are collected below. Variant names intentionally preserve the source spelling MountianViewHaus from the Figma set.

Props

PropValuesNotes
buildingNameDefault, Alpine, SlideMountain, Ralphs, Chalet, ForestHaus, MountianViewHaus, EstonianSauna, Cabin, OpasCabinSelects the silhouette and its accessible label
colorSmoke, Snow, LakeForest, Ash, AlpineFill colour applied through the mask
classNamestringPlacement only; height is set per silhouette
imageBaseUrlstringOptional asset URL prefix for sites served under a base path

Responsive behaviour

Each silhouette has a fixed intrinsic width (283px) and a height that mirrors the Figma geometry; the icon keeps its aspect ratio and scales with the theme. Because of that fixed width, the variants grid uses one column on phones and two from the sm breakpoint up, so icons are never squeezed into narrow tracks. The colours row wraps on narrow screens.

Usage

import { BuildingIcon } from '@/components/rooms/BuildingIcon';

<BuildingIcon buildingName="Alpine" color="LakeForest" />

View source