# Picasso — component guidance
Integrated Research's design system. Generated from the repo, which is the source of truth.
Generated 2026-11-09.
## Accordion
Sections that expand in place, for content most people will not need to read.
Structure from figma; measurements from figma.
Import: import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@ir/ui";
Watch out:
- Figma's axis is `Type` (FAQ | Default); here it is `variant`, because Radix's Root already owns `type` for single-versus-multiple open. The values keep Figma's names.
- DON'T Pick the icon pair by taste.
DO faq (plus/minus) for answers that appear; default (chevrons) for sections that unfold.
WHY This is the only thing the axis changes, and it is the only signal people get about what the control will do.
- DON'T Hide the thing the page is about behind a closed section.
DO Collapse what most people will skip — edge cases, detail, history.
WHY Anything collapsed is not found, not read and not searchable on the page. That is the cost of every closed row.
- DON'T Write "More" or "Details" on the trigger.
DO Say what is inside — the trigger is the only thing visible when closed.
WHY A closed accordion is a list of its own labels. If the labels say nothing, the list says nothing.
- DON'T Default to multiple open just to avoid choosing.
DO Single for comparison-free reading, multiple when people cross-reference sections.
WHY Single keeps the page short; multiple keeps two answers side by side. Which one is right depends on the reading, not the component.
- DON'T Add a rule under the last item to close the list off.
DO Put the divider above each item after the first.
WHY The rule separates items. A trailing one draws a line under nothing.
Accessibility:
- Radix sets aria-expanded and aria-controls on the trigger and the region on the panel. Do not add your own.
- The chevron is aria-hidden, so the trigger's text is its entire accessible name — a trigger with only an icon has none.
- Focus is a 2px ring offset against bg/app. :focus-visible clears the browser outline globally, so a trigger without the ring has no focus indicator at all.
## Alert
Something the page needs to say about itself, in place — and that stays there.
Structure from figma; measurements from figma.
Import: import { Alert, AlertTitle, AlertDescription } from "@ir/ui";
Props (AlertProps):
- icon?: boolean — Hide the tone icon. Figma's `Icon` boolean.
- onDismiss?: () => void — Renders the dismiss control at the end of the title row.
- dismissLabel?: string — Label for the dismiss control — it is an ✕, so it needs words.
- action?: React.ReactNode — The trailing action, an xs Outline Button in Figma's `Action=Button`.
Variants:
- variant: info | destructive | warning | success (default info)
Watch out:
- The icon and the dismiss take `fg/neutral/emphasis`, the same ink as the title, in all four tones. That is Figma's spec, and it is why the tone has to be carried by the surface — do not tint the icon to compensate.
- **The icon and the dismiss live inside the title row**, which is where Figma puts them, so they align with the title rather than floating against the middle of a two-line block. It also means an Alert with no `AlertTitle` has neither — again, Figma's shape, since both are children of the title row there. If a dismissible alert with no title is wanted, that is a change to the Figma component first.
- DON'T Use an Alert for something that just happened and does not need to persist.
DO Use Toast for a passing confirmation; keep Alert for a condition that is still true.
WHY An Alert stays on the page. If the thing it describes is over, it becomes a piece of furniture people learn to read past.
- DON'T Use an Alert to ask a question that must be answered before continuing.
DO Use a Dialog when the work genuinely cannot proceed.
WHY An Alert can be ignored by design. A question that cannot be ignored needs a control that takes the focus.
- DON'T Reach for Destructive because the message feels important.
DO Match the tone to the state: success happened, warning is about to, destructive already went wrong, info is context.
WHY Four tones only work while they differ. A page of red alerts carries exactly as much information as a page of grey ones.
- DON'T State the problem and stop — "Connection failed."
DO Say what happened and what happens next, and attach the action if there is one.
WHY An alert that cannot be acted on is a notification. The description is where the reader finds out whether this is theirs to fix.
- DON'T Let someone dismiss an alert describing a condition that is still true.
DO Offer dismiss for something acknowledged; leave a live condition on the page until it clears.
WHY Dismissing is a promise that the information is no longer needed. If the disk is still full, closing the notice only hides it.
- DON'T Stack four alerts at the top of a page.
DO Show the one that matters, or summarise them into a single alert that links to the detail.
WHY A stack of alerts reads as a wall. Whichever is most urgent is the one least likely to be read.
- DON'T Write a title that wraps onto a second line.
DO Keep the title to a short phrase and put the rest in the description.
WHY The title shares its row with the icon and the dismiss. A wrapping title pushes them apart and stops the row reading as one thing.
Accessibility:
- No role by default, deliberately. role="alert" interrupts a screen reader mid-sentence — use it only for something that has just gone wrong, and role="status" for something that merely changed.
- The leading icon is aria-hidden. Severity has to be in the words; colour and icon alone reach nobody using a screen reader.
- The dismiss button's accessible name comes from dismissLabel. An X with no label announces nothing.
## AppShell
The frame every product screen starts from — rail, top bar, page padding.
Structure from figma; measurements from figma.
Import: import { AppShell, AppShellMain, AppShellHeader, AppShellContent } from "@ir/ui";
Variants:
- width: fluid | standard | reading (default fluid)
- DON'T Put the page title, search and page actions in the top bar.
DO Keep it to the sidebar toggle and the breadcrumb; the page header lives in the content area.
WHY The bar is 48 high and it is the same bar on every screen. Everything added to it competes with the breadcrumb, which is the one thing that tells you where you are.
- DON'T Ship the rail collapsed to win back 208px.
DO Default to expanded from lg (1024) up, and to collapsed only at md (768) where the content would drop under 720.
WHY An icon-only rail is a memory test for anyone who does not already know the product. The width is worth more to the person than to the layout.
- DON'T Re-derive the breakpoint from a screen width quoted in a spec.
DO Trust the named step — `xl:` is 1280 in the tokens, in Tailwind and in the class.
WHY IR's ladder used to be Tailwind's shifted up one, so `lg:` meant 1280 to a designer and 1024 to the browser. They are one ladder now, and the name is the thing to trust.
- DON'T Stretch four tiles across a wide screen.
DO Let a dashboard add columns as it widens.
WHY A KPI tile stretched to 500 wide carries the same number in twice the space, and the eye has further to travel between them. On a fluid page the spare width becomes more tiles per row — an auto-fill grid with a 224 minimum — and charts go from one across to two at 768 of content and three at 1280.
- DON'T Let a field span the content area.
DO Cap forms and prose at the reading width.
WHY A 1600-wide text field gives no sense of what length of answer is expected, and a line of prose that long is hard to track back to its start. width="reading" caps the column at 768 (size/content/reading).
- DON'T Centre capped content.
DO Keep capped content aligned to the rail.
WHY Centring moves the start of every line as the window resizes, and breaks the alignment with the rail and the breadcrumb above it. Left-aligned, the page heading starts in the same place whether the page is fluid, standard or reading.
- DON'T Use viewport breakpoints inside the content area.
DO Size dashboard grids to their container.
WHY The viewport does not know about the rail, the padding, a cap or a drawer. The same grid sits in a 976 column at 1280 with the rail open and a 1184 one with it collapsed. Use the @-variants (@3xl:, @7xl:); viewport breakpoints are for the shell — rail collapse and padding.
- DON'T Lock a chart to an aspect ratio.
DO Give charts a fixed height range.
WHY An aspect ratio makes a chart grow taller as the screen widens, so on a 2560 monitor one chart fills the screen and pushes everything under it out of view. Width is where the extra time range goes; height stays between 240 and 320.
- DON'T Let the shell scroll as well as the page.
DO Keep the scroll in the content area so the rail and the top bar stay put.
WHY Two scrollbars is the most common app-shell bug and the hardest to notice in a screenshot: the top bar slides away and the breadcrumb goes with it.
Accessibility:
- AppShellMain is a plain
, never . It contains the top bar, and chrome inside the main landmark both pollutes it and strips the of its banner role — a carries that role only when it is not inside main, aside, nav or section.
- AppShellHeader is the and therefore the page's banner; AppShellContent is the document's . One of each per page.
## Avatar
A person or tenant, as a picture, initials or a generic mark.
Structure from figma; measurements from figma.
Import: import { Avatar, AvatarImage, AvatarFallback, AvatarStatus, AvatarGroup, AvatarAddButton } from "@ir/ui";
Props (AvatarFallbackProps):
- icon?: boolean — Show the generic person icon instead of initials. Figma's `Placeholder icon`.
Props (AvatarStatusProps):
- count?: number — For type="count".
- label?: string — What the dot means, for anyone not looking at it.
Props (AvatarGroupProps):
- action?: React.ReactNode — Trailing control, sat 8px clear of the stack. Usually AvatarAddButton.
- ring?: boolean — Ring every avatar in the group. Defaults to true, matching the file: without it, overlapping avatars have no edge and swallow each other's initials.
- max?: number — Show at most this many, then a "+N" avatar for the rest — which is exactly what the file draws at the end of a group.
Props (AvatarAddButtonProps):
- label?: string — What adding does. "Add" alone rarely says enough.
Variants:
- size: xs | sm | md (default md)
- variant: default | inverse (default default)
- size: default | inverse (default md)
Watch out:
- Note the ring is NOT what Figma uses for groups — every avatar in `Avatar group` is Border=False, so overlapping avatars have no separating edge at all. Followed as drawn; raised as an observation, because same-fill circles overlapping by 4–12px have nothing marking where one ends.
- Figma's online dot has two gradient "Reflection" layers over the solid fill — a radial highlight and a linear sheen. Reproduced here as the flat fill only: the gradients need per-stop colour values, which is exactly what no-arbitrary-values refuses, and a gloss on an 10px dot is below the threshold where anyone can see it. Raised rather than quietly matched.
- DON'T Render an avatar with only an image source.
DO Always give it initials or the generic person to fall back to.
WHY Profile pictures 404 more than anything else on a page. Without a fallback the layout collapses to an empty circle.
- DON'T Let the dot be the only thing saying someone is offline.
DO Give AvatarStatus a label, and repeat the state in text nearby.
WHY A colour on a 10px dot is invisible to a screen reader and hard for anyone who does not know the convention.
- DON'T Hang the only route to a profile off clicking the avatar.
DO Wrap it in a real link or button with a name.
WHY An avatar is an image. Nothing about it says it can be activated, and nothing announces where it goes.
- DON'T Use initials alone in a list people scan to find someone.
DO Put the name beside it; keep the avatar as recognition, not identification.
WHY Two colleagues share initials more often than you would think, and initials do not disambiguate them.
- DON'T Mix avatar sizes down one list.
DO Pick the size from the row it sits in — xs in dense tables, md in headers.
WHY The avatar sets the row's optical height. Changing it mid-list makes the whole list look misaligned.
- DON'T Stack twenty avatars because twenty people are on the incident.
DO Cap with max and let the +N carry the rest.
WHY Past about five, the faces stop identifying anyone and the row just eats width.
Accessibility:
- AvatarStatus carries role="img" with an aria-label — "online", "3 unread", or whatever label says. A dot that silently turns green tells a screen reader nothing.
- The User fallback icon and the verified badge are both aria-hidden; the status wrapper's label is the only text in it.
- The overflow "+N" button takes an explicit label. It is an icon and a number with no sentence of its own.
## Badge
A short, static label on a thing — a status, a count, a category.
Structure from figma; measurements from figma.
Import: import { Badge } from "@ir/ui";
Props (BadgeProps):
- asChild?: boolean — Render as the child element, keeping Badge's styling.
- dot?: boolean — An 8px status dot before the label, in the matching status colour.
Variants:
- color: neutral | success | warning | danger | info (default neutral)
- variant: subtle | emphasis | outline (default subtle)
- size: md | lg (default md)
Watch out:
- **Outline ignores the colour.** All five colours render identically in Figma — neutral fill, neutral border, neutral text — so 40 of the 120 variants collapse to 8. That is the file's spec and it is kept here, but it means `` is not a red badge and never was. Raised, not changed.
- Neutral subtle takes `border/neutral/subtle` where every other colour takes `border//muted` — a quieter edge for the quiet colour. Also the file's spec.
- DON'T Make a badge clickable, or use one as a filter chip.
DO Use Chip for something selectable and Button for something that acts.
WHY A badge is a label on a thing, not a thing to press. Making one clickable gives it no focus ring, no hit area and no keyboard route.
- DON'T Signal status with colour and nothing else.
DO Keep the word — "Healthy", "Critical" — and add the dot if it helps.
WHY Colour alone fails for anyone who cannot separate the hues, and a badge is small enough that the hue is all there is. The word is the signal; the colour reinforces it.
- DON'T Put three badges in a row on the same object.
DO Show the one that changes what the reader does next.
WHY Badges are loud by design. Three of them compete, and the reader ends up scanning past all three.
- DON'T Write a sentence in a badge.
DO One or two words. Put the detail in the text beside it.
WHY A badge does not wrap gracefully and cannot be read at a glance once it is longer than its container is wide.
- DON'T Use emphasis badges everywhere because they read more clearly.
DO Keep emphasis for the exception, and subtle for the rest.
WHY The solid fill is the loudest thing on most surfaces. Used for every row it becomes the background, and the one that matters disappears into it.
- DON'T Reach for outline expecting a quieter red or green.
DO Use subtle for a quiet coloured badge; outline is deliberately neutral.
WHY Outline renders identically for all five colours — neutral fill, neutral border, neutral text. Choosing it discards the colour rather than muting it.
Accessibility:
- The dot is aria-hidden. A badge's meaning is its text — colour and dot are reinforcement, never the signal.
- Badge is not a live region. A count that changes while the page is open announces nothing unless the surrounding component says so.
## BarChart
A measure compared across categories — calls per site, failures per cause, minutes per region. Grouped, or stacked when the parts make a whole.
Structure from code; measurements from code.
Import: import { BarChart } from "@ir/ui";
Props (BarChartProps):
- stacked?: boolean — Parts of a whole, stacked on one baseline. Grouped when false.
- yMax?: number — Pin the top. The bottom is always zero.
- label: string — Sentence for the table caption.
Watch out:
- The bars are HTML, not SVG, and that is the point. The plot elsewhere is a 0–100 box stretched to its width, which is ideal for a line and wrong for a bar: stretching turns a 24px cap into whatever the container feels like and bends a 4px corner into an ellipse. As elements, a bar is capped at 24 exactly, its data-end is rounded 4 and its baseline end is square, and the 2px gap between touching marks is 2px. Only the gridlines stay SVG, and horizontal rules do not distort.
- Bars start at zero, always. A bar says "this much", and a bar chart with a cut-off baseline says it at four times the size. `yMin` is not offered.
- Stacked bars are for parts of a whole. Only the bottom segment and the total can be read along a common baseline; everything between floats. If the comparison people actually make is between the middle segments, group them instead.
- DON'T Cut the baseline to make a small difference look like a big one.
DO Start every bar at zero. Use a line chart if the interesting range is a narrow band well above it.
WHY A bar encodes its value as length, so a cut baseline multiplies the difference by whatever the author chose. There is no `yMin` on this component for exactly that reason.
- DON'T Stack series people need to compare with each other.
DO Stack only when the parts add to a total worth reading; group when the comparison is between the parts.
WHY In a stack only the bottom segment and the grand total share a baseline. Every segment in between floats on the ones below it, so comparing two middles across columns is comparing two things that start in different places.
- DON'T Let bars grow to fill their slot, so a four-category chart is four slabs with no air.
DO Leave the 24 cap alone; the gap between groups is what separates them.
WHY The space is doing work — it is what makes a group read as one thing and the next as another. A bar that fills its slot turns a chart into a wall.
- DON'T Rotate category labels to 45° to fit them in.
DO Let them truncate, or turn the chart on its side, or shorten the category names.
WHY Angled text is measurably slower to read and the rotation grows with the category count, so the chart gets harder exactly as it gets busier. Truncation with the full name on hover keeps every label on one baseline.
Accessibility:
- Like every chart here, the plot is `aria-hidden` and the numbers are carried by a visually-hidden table.
- Each bar carries its own `title` — series, category and value — so a pointer can read one without a crosshair.
- A missing value leaves the slot empty rather than drawing a zero-height bar, which would be indistinguishable from a real zero.
- The 2px gap between touching bars is in the surface colour, so adjacent segments in a stack stay separable without a stroke.
## BottomSheet
A panel that rises from the bottom edge over a scrim — the phone-sized answer to a Select, a filter or a sort menu.
Structure from code; measurements from code.
Import: import { BottomSheet, BottomSheetTrigger, BottomSheetClose, BottomSheetContent, BottomSheetHeader, BottomSheetTitle, BottomSheetDescription, BottomSheetCloseButton, BottomSheetBody, BottomSheetItem, BottomSheetFooter } from "@ir/ui";
Props (BottomSheetContentProps):
- label?: string — Accessible name for a sheet with no visible `BottomSheetTitle`. Mutually exclusive with it.
- handle?: boolean — The handle. On by default; it is the affordance for the drag, not a control.
- drag?: boolean — Drag the handle or header down to dismiss. On by default.
Watch out:
- The drag is an addition, never the exit. A sheet whose only way out is a gesture is a sheet a keyboard or switch user cannot leave, so the close button is always drawn and the handle stays aria-hidden: it is an affordance for the gesture, not a control.
- Not for navigation. A phone's main nav is full screen (SidebarMobile); a sheet is for one decision about the page beneath it.
- DON'T Open an anchored Popover or Select menu from a 32-tall trigger on a phone.
DO Below md (768), open the same choices in a BottomSheet; keep the Popover from md up.
WHY On the Clarion Endpoints page the anchored menus clipped against a 390 viewport and put 32-tall rows under a thumb. The sheet starts where the thumb already is.
- DON'T Apply each tick live while the sheet is still covering the result.
DO Collect ticks in a draft and commit on Apply, with the count — "Apply · 2". Clear sits beside it.
WHY The list being filtered is under the scrim, so a live change is one nobody can see. It also matches Select's apply-not-live rule.
- DON'T Keep the draft when the sheet is dismissed with the scrim, Escape or the close button.
DO Treat every way out except Apply as Cancel.
WHY Same rule as Select — a dismissal that half-commits leaves people unsure what is filtered.
- DON'T Ship the drag as the way out, with nothing drawn to close the sheet.
DO Draw the close button as well. The drag is a shortcut for a thumb; Escape, the scrim and the close button are the exits.
WHY A gesture-only exit cannot be reached by a keyboard or by switch control, and nothing on screen tells anyone the panel can be dragged. The handle hints at it and stays aria-hidden, so the drag is an addition to the three exits rather than a replacement for them.
- DON'T Let the sheet fill the screen.
DO Cap it (5/6 of the viewport) and scroll the body; leave the page peeking above.
WHY A sheet that covers everything reads as a new screen, and people stop expecting the scrim to take them back.
- DON'T Reuse the 28–32 menu rows from the desktop Popover.
DO Use BottomSheetItem — 48 tall, the whole row a label around the Checkbox or Radio.
WHY Desktop menu rows are sized for a pointer. A thumb needs about 44, and a row that only reacts on its checkbox is a row people miss.
- DON'T Put the app's navigation in a bottom sheet.
DO Use SidebarMobile — the nav full screen — and keep sheets for one decision about the page beneath.
WHY Navigation leaves the page; a sheet is about the page. Mixing them makes Apply and 'go somewhere' look the same.
Accessibility:
- Built on Radix Dialog: modal, focus trapped, Escape and a scrim tap close it, focus returns to the trigger.
- Give it a visible BottomSheetTitle, or `label` when there is none — never both.
- The handle is aria-hidden: it hints at the drag, it is not a control. Everything the drag does is also reachable by keyboard.
- The panel follows the finger under prefers-reduced-motion too — direct manipulation is not animation. On release the settle is instant and a dismissal is a short fade.
- BottomSheetItem is a