Skip to content

Dropdown

Canonical dropdown trigger + overlay menu pair. Uses the published DropdownMotion snapshot for entry / exit timing.

PromeoDropdownV2 via Flutter micro-app at /preview. Live state pushed via postMessage.

Anatomy diagram pending. The pattern composes a button-style trigger with an animated overlay menu portal; selected row and caret visuals follow the published DropdownMotion snapshot.

Do

  • Use for a discrete choice from a short, known set of options.
  • Let the trigger fill its parent constraints unless the layout demands a fixed width.

Don’t

  • Don’t use for free-form text entry — reach for PromeoInput instead.
  • Don’t nest a dropdown inside another overlay; the portal stacking will fight you.
PromeoDropdownV2(
value: selected,
items: const [
PromeoDropdownItem(value: 'opt1', label: 'Option 1'),
PromeoDropdownItem(value: 'opt2', label: 'Option 2'),
],
onChanged: (next) => setState(() => selected = next),
)
PropTypeDefaultNotes
valueStringrequiredCurrently-selected item `value`.
itemsListrequiredItems: pass either `String` or `DropdownItem(value, label)`.
onChangedValueChanged<String>requiredFired when the user picks an item.
disabledboolfalseLocks interaction; renders disabled style.
widthdouble?nullTrigger width. `null` (default) lets the trigger fill its parent's
constraints — matches the layout expectation of consumers like the
mk-post settings panel where dropdowns stretch to the section width.
Pass a concrete value (e.g. 252) for fixed-width usages like the lab.
placementDropdownPlacementauto`auto` (default) flips based on viewport space; `top` / `bottom` force.
motionDropdownMotion?nullPer-instance motion override; `null` = use registry defaults.
openbool?nullControlled-open mode. Pair with [onOpenChange] to drive open state
from outside the widget (mirrors React lab).
onOpenChangeValueChanged<bool>?nullFired when the menu's open state changes.
  • The snippet above reflects the currently-published snapshot’s DropdownMotion overrides; drag the Workshop lab sliders + Apply + Sync to bump the snapshot tag (PRD 02 §6 + slice 3.5).
  • Width default = “fill parent” is intentional (regression from the width: 252 incident, 2026-05-14). Pass a concrete width only when the layout demands it.