Components
Input button
A button dressed as a field, for things that open a picker — a date, a filter.
{/* Generated by scripts/build-component-docs.mjs — do not edit. The source is the component folder: guidance.json, the doc block and the props. Change those. */}
A button dressed as a field, for things that open a picker — a date, a filter.
Import
import { InputButton } from "@ir/ui";Props
| Prop | Type | Required | What it does |
|---|---|---|---|
icon | React.ReactNode | Leading icon — Calendar, Filter, … | |
value | React.ReactNode | What is chosen. Leave empty to show the placeholder. | |
adornment | React.ReactNode | Something between the value and the chevron — Select puts its count here. | |
hideChevron | boolean | Hide the trailing chevron. |
Do and don't
Use InputButton.
Don't — Fake a picker trigger with a read-only input.
A read-only input is announced as a text field that cannot be edited — the opposite of what it does. A button with aria-expanded says what it is.
Pass value, and let placeholder render in the placeholder colour when it is empty.
Don't — Show 'Select…' in the same colour as a chosen value.
Empty and filled must be distinguishable at a glance, exactly as they are in an Input.
Accessibility
- A real <button>; set aria-expanded when it controls a popover (Radix triggers do this). The chevron turns with it.
- The leading icon is aria-hidden.
Where it is drawn
Figma — structure from figma, measurements from figma.