Raft Design System

Components · Inputs

PickerTriggerButton

The compact 32px button (34px with a mouse) that opens a Select or Combobox as a filter above a list, outlined until the filter is applied and filled once it is.

StableAlso called Filter, Filter button, Filter trigger
import { PickerTriggerButton } from "@botiverse/raft-ui";

PickerTriggerButton is the button of a filter: a compact 32px trigger (34px with a mouse, the control height) that opens the list of a Select or a Combobox above the list it filters. It has no state of its own. It is rendered as the select's or combobox's trigger, which keeps opening, focus, keyboard navigation and selection.

picker-trigger-button/compositions/select-filter

When to use

SituationUse
Filtering a list by one valuePickerTriggerButton, rendered as a SelectTrigger or ComboboxTrigger
Filtering a list by several valuesTagFilter, whose trigger is a PickerTriggerButton
A filter people set seldom, by habit, that the button doesn't namePickerTriggerButton that always says Filter, rendered as a DropdownMenuTrigger, with a FilterChip beside it
Picking a value in a formThe select's own field (Select)
A list of actionsA menu (DropdownMenu)
A row of options, each on or off on its ownToggleGroup
One on/off filter among the filters above a list (Relevant to me)PickerTriggerButton on its own, as a toggle (below)

The full choice between pickers is in Choosing a component. How a filter looks, how many values it shows and where Clear all goes are in Select › Filters.

Anatomy

PickerTriggerButton is one part. Pass it as render to SelectTrigger or ComboboxTrigger (or DropdownMenuTrigger for a Filter button, below), and put the trigger's usual parts inside, in this order:

  • A leading icon: optional, 14px.
  • The value: SelectValue, or the chosen label for a combobox. Required.
  • ComboboxTriggerCount: how many values an applied combobox filter has. Optional.
  • The indicator: SelectIcon or ComboboxTriggerIndicator, a chevron in foreground-hint. In a DropdownMenuTrigger, wrap the chevron in a span with data-picker-trigger-indicator.
picker-trigger-button/compositions/combobox-filter

A filter that is only on or off (Relevant to me) is a PickerTriggerButton on its own, not inside a trigger: a leading icon, its name, and optionally how many items it would show, with no indicator, since it opens nothing. A press turns it on or off.

States

StateLook
Not appliedforeground-muted text inside a line-seam outline
Applied (data-has-value)info-soft fill, foreground text, no outline (States: an active filter is selected content)
Invalid (data-invalid)A danger-strong outline
DisabledFollows States: fill-muted, foreground-disabled text
  • A toggle sets data-has-value while it is on, so it looks like any applied filter.
  • ComboboxTrigger sets data-has-value when the combobox has a value. A SelectTrigger always holds a value, so it never sets it: pass data-has-value yourself when the filter differs from its default.

Behavior

  • The list opens next to the trigger, as every popup does (Elevation); its width and alignment are in Select › Behavior.
  • The trigger keeps its height and doesn't wrap or truncate: a long value makes it wider.

Content

  • Once a value is chosen, show the value alone when it says which filter it is: #launch-week is a channel, @alice a person, Relevance an order. When the value can't say that, show the filter's name with it: Source: All, Source: Marketplace. All, Shared or Marketplace alone could be any filter (cindyz, 2026-11-27, #proj-apps:b00884a6). Before a value is chosen, show the filter's name: Channel, Assignee.
  • The exception is the Filter button: for a filter people set seldom and by habit, the button always says Filter and a FilterChip beside it names the active filter. Which of the two a filter takes is in Select › Filters.
  • The general rules for labels are in Writing.

Accessibility

  • PickerTriggerButton wraps the Base UI Button. The select or combobox it is rendered for adds the trigger's role, aria-expanded and the popup relationship.
  • Its accessible name is its text. When the text is the value alone (#launch-week), add an aria-label that also names the filter ("Channel: #launch-week"), because a screen reader user doesn't see what the value is next to. When the text already names the filter (Source: All), the accessible name is that same text, set as the aria-label, since a combobox doesn't take its name from what it shows.
  • A toggle sets aria-pressed (true while on): it is a toggle button, not a trigger, so it has no aria-expanded.
  • Hide the leading icon and the chevron from assistive technology (aria-hidden).
  • Name the search row of a combobox filter with aria-label ("Search channels").

Rules

  • Use PickerTriggerButton only for filters. A picker in a form uses the select's own field with an ink border, as high as the inputs around it.
  • Don't open a menu of actions from it: as a trigger it always opens a list of values, and as a toggle it opens nothing. A Filter button's menu holds only radio items, one per filter.
  • Don't style an applied filter yourself. Set data-has-value and let the component fill it. A Filter button never sets it: its chip shows that a filter is applied.

API

PickerTriggerButton

PropTypeDefault
focusableWhenDisabledWhether the button should be focusable when disabled.booleanfalse
nativeButtonWhether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (for example, `<div>`).booleantrue
renderAllows you to replace the component's HTML element with a different tag, or compose it with another component.ReactElement | ((props, state) => ReactElement)

Also takes the attributes of its element.

Changes

  • 0.5.0 · AddedGraduated PickerTriggerButton for compact Select and Combobox filter triggers. ([#208](https://github.com/botiverse/rui/pull/208), [0fef4c1](https://github.com/botiverse/rui/commit/0fef4c1d39e18335d2c2fc3a7102054f6f72339d))