Integrated ResearchPicasso
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

PropTypeRequiredWhat it does
iconReact.ReactNodeLeading icon — Calendar, Filter, …
valueReact.ReactNodeWhat is chosen. Leave empty to show the placeholder.
adornmentReact.ReactNodeSomething between the value and the chevron — Select puts its count here.
hideChevronbooleanHide 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.

Open in Storybook

On this page