Forms

DropdownTrigger

Button-shaped trigger that opens a dropdown menu, optionally rendering a trailing disclosure caret.

import { DropdownTrigger } from '@lostgradient/cinder';
formtrigger
01

Overview

Activates the associated dropdown menu on click or keyboard interaction.

Usage

DropdownTrigger is a compose-only leaf of Dropdown. The idiomatic API is Dropdown.Trigger, reached through the parent namespace — see the dropdown README for the composed snippet. The leaf is also a named export of @lostgradient/cinder.

02

When to use

Use when
  • Opening a dropdown-menu from a button styled to match cinder's form controls.
  • Pairing with dropdown to expose a custom menu from a labelled affordance.
Avoid when
  • Triggering a discrete action with no menu — use button instead.
03

Props

Props for dropdown-trigger
Name
Type
Default
Description
caretVisible boolean true Render the trailing disclosure caret. Defaults to true.
iconOnly boolean false The trigger shows only an icon (its name in visually hidden text): it is drawn square, as tall as it is wide, at its size, so a "More actions" menu in a row of buttons is a square, never a pill. Pair it with caretVisible={false}.
variant 'primary''secondary''soft''danger''soft-danger''ghost''ghost-danger''ghost-accent'
1 more members 'link'
Draws the trigger as a Button of this variant. Inside a ButtonGroup (a split button) the trigger is always drawn as a Button, and without this it takes the variant of the Button beside it, so the two halves are one control with one seam; with neither it is soft, Button's default. Outside a group, without this, the trigger keeps its own bordered face.
size 'xs' | 'sm' | 'md' | 'lg' Draws the trigger at this Button size. Inside a ButtonGroup, without this, it takes the size of the Button beside it, or md.
mutating boolean false Marks a menu of actions that change something. Inside a stale <StaleRegion> the trigger goes inert: it keeps focus and carries aria-disabled, the menu does not open, and the region's reason describes it. It returns by itself when the region stops being stale.
children snippet
onclick MouseEventHandler<T> | undefined | null
style text