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.
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.
When to use
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:
SelectIconorComboboxTriggerIndicator, a chevron inforeground-hint. In aDropdownMenuTrigger, wrap the chevron in aspanwithdata-picker-trigger-indicator.
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
- A toggle sets
data-has-valuewhile it is on, so it looks like any applied filter. ComboboxTriggersetsdata-has-valuewhen the combobox has a value. ASelectTriggeralways holds a value, so it never sets it: passdata-has-valueyourself 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-expandedand the popup relationship. - Its accessible name is its text. When the text is the value alone (#launch-week), add an
aria-labelthat 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 thearia-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 noaria-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-valueand let the component fill it. A Filter button never sets it: its chip shows that a filter is applied.
API
PickerTriggerButton
Also takes the attributes of its element.
Related
Changes
- 0.5.0 · AddedGraduated
PickerTriggerButtonfor compact Select and Combobox filter triggers. ([#208](https://github.com/botiverse/rui/pull/208), [0fef4c1](https://github.com/botiverse/rui/commit/0fef4c1d39e18335d2c2fc3a7102054f6f72339d))