# @whyhotel/ui-core-components — full reference > Placemakr product design-system React component library — accessible, token-driven UI components that render against the Placemakr theme in @whyhotel/ui-core-theme. Generated from component TS types and zod schemas (source: `src/components`). Code is the source of truth; this file is a build artifact — do not edit by hand. ## Accordion Accordion — a set of stacked sections that each expand or collapse in place to reveal their content. Use it to condense long, scannable content (FAQs, policy details, optional settings) so people see the headings first and open only what they need. It stays in the page flow rather than floating over other content — reach for a Dialog when the content must interrupt the user. Set `allowMultiple` when several sections may be open at once. Triggers are real buttons with `aria-expanded`, and each content region is labelled by its trigger, so it is keyboard- and screen-reader-accessible by default. ### Variants - **open**: boolean ### Slots - `root` - `item` - `title` - `content` ### Props | Prop | Type | Required | Default | Source | Description | | --- | --- | --- | --- | --- | --- | | `open` | `boolean` | no | — | variant | — | | `className` | `string` | no | — | interface | Extra classes merged onto the root container. | | `items` | `readonly AccordionItem[]` | no | — | interface | Sections to render. | | `defaultOpen` | `number` | no | — | interface | Index open on mount; `-1` for all closed. | | `allowMultiple` | `boolean` | no | — | interface | Allow several sections open at once. | ### Usage ```tsx ``` --- ## Alert Alert — a static, inline status message that stays on the page to explain a condition or outcome (a warning, a confirmation, an error to resolve). Use it for information tied to a region of the page that the user should notice but that does not demand an immediate modal decision; for transient confirmations that fade on their own, use a Toast instead. Pick the `tone` to match intent — `info`, `success`, `warning`, `danger`, or `brand` — and pass `onDismiss` when the alert should be dismissible. The `danger` tone announces assertively to assistive tech; the others announce politely. ### Variants - **tone**: `info`, `success`, `warning`, `danger`, `brand` (default `info`) ### Props | Prop | Type | Required | Default | Source | Description | | --- | --- | --- | --- | --- | --- | | `tone` | `'info' \| 'success' \| 'warning' \| 'danger' \| 'brand'` | no | `info` | variant | — | | `className` | `string` | no | — | interface | Extra classes merged onto the root (tailwind-variants resolves conflicts). | | `icon` | `React.ReactNode` | no | — | interface | Leading icon node the caller supplies. | | `title` | `React.ReactNode` | no | — | interface | Emphasised first line. | | `action` | `React.ReactNode` | no | — | interface | Trailing action node — usually a ghost or secondary Button. | | `onDismiss` | `() => void` | no | — | interface | Renders a dismiss control that calls this handler. | | `children` | `React.ReactNode` | no | — | interface | Body message. | ### Usage ```tsx label ``` --- ## Avatar Avatar — a small square or circular chip that stands in for a person or entity with a photo or their initials (a guest, a teammate, a property). Use it in lists, headers, and comment rows to make ownership scannable at a glance. Pass `src` for a photo, or set `placeholder` with initials `children` when there is no image; pick a `shape` and `size` to match the surface, and add `status` to show online or offline presence. It is display only — wrap it in a Button or link when it needs to be actionable. ### Variants - **status**: `online`, `offline` - **shape**: `circle`, `square`, `rounded` (default `circle`) - **size**: `xs`, `sm`, `md`, `lg` (default `md`) - **placeholder**: boolean ### Slots - `root` - `figure` ### Props | Prop | Type | Required | Default | Source | Description | | --- | --- | --- | --- | --- | --- | | `status` | `'online' \| 'offline'` | no | — | variant | — | | `shape` | `'circle' \| 'square' \| 'rounded'` | no | `circle` | variant | — | | `size` | `'xs' \| 'sm' \| 'md' \| 'lg'` | no | `md` | variant | — | | `placeholder` | `boolean` | no | — | variant | — | | `className` | `string` | no | — | interface | Extra classes merged onto the root (tailwind-variants resolves conflicts). | | `src` | `string` | no | — | interface | Photo source; when set the avatar renders an ``. | | `alt` | `string` | no | — | interface | Alt text for the photo — describe the person, not "avatar". | | `children` | `React.ReactNode` | no | — | interface | Stand-in content (usually initials) shown when there is no `src`. | ### Usage ```tsx label ``` ```tsx ``` ```tsx JD ``` ### Do - Give photos meaningful `alt` text so screen readers announce who it is. ### Don't - Put long text in a placeholder — keep it to one or two initials. --- ## Badge Badge — a small inline label that tags an element with a short status or count (e.g. "checked in", "3 new"). Use it beside a title, table cell, or list item to surface state at a glance; keep the text to a word or two. Choose a `tone` to signal meaning and a `size` to match the surrounding type, and add `dot` for a leading status dot. It is decorative labelling, not an interactive control — use a Button for actions. ### Variants - **tone**: `neutral`, `brand`, `info`, `success`, `warning`, `danger` (default `neutral`) - **size**: `sm`, `md`, `lg` (default `md`) - **outline**: boolean ### Props | Prop | Type | Required | Default | Source | Description | | --- | --- | --- | --- | --- | --- | | `tone` | `'neutral' \| 'brand' \| 'info' \| 'success' \| 'warning' \| 'danger'` | no | `neutral` | variant | — | | `size` | `'sm' \| 'md' \| 'lg'` | no | `md` | variant | — | | `outline` | `boolean` | no | — | variant | — | | `className` | `string` | no | — | interface | Extra classes merged onto the root (tailwind-variants resolves conflicts). | | `dot` | `boolean` | no | — | interface | Leading status dot instead of an icon. | | `icon` | `React.ReactNode` | no | — | interface | Leading icon node the caller supplies (the shared Icon primitive is out of slice scope). | | `children` | `React.ReactNode` | no | — | interface | Short status label. | ### Usage ```tsx label ``` --- ## Breadcrumbs Breadcrumbs — a compact trail showing where a page sits in the hierarchy and a one-tap way back up it. Feed it `items` from root to current; each crumb with an `href` renders as a link, and the last crumb renders as plain text marked `aria-current="page"` so it reads as the place you are. Use it on deep pages (a reservation inside a stay inside a property) to keep orientation cheap; skip it on top-level screens where there is nowhere to go up. Pick a `size` to match the surrounding type, and pass an `icon` on a crumb for a leading glyph. The root is a labelled `