Dropdown
Current implementation: PromeoDropdownV2. The canonical dropdown trigger
- menu pair, using the published
DropdownMotiondefaults (currently sourced fromdefaults/patterns/dropdown_v2.json) for entry / exit animation timing. The trigger fills its parent constraints unlesswidthis set explicitly.
Preview
Section titled “Preview” PromeoDropdownV2 via Flutter micro-app at /preview. Live state pushed via postMessage.
// from snapshot v2026.05.15-001import 'package:flutter/material.dart';import 'package:promeo_design_system/promeo_design_system.dart';
class DropdownSample extends StatefulWidget { const DropdownSample({super.key}); @override State<DropdownSample> createState() => _DropdownSampleState();}
class _DropdownSampleState extends State<DropdownSample> { String _value = 'opt1';
@override Widget build(BuildContext context) { return PromeoDropdownV2( value: _value, items: const [ DropdownItem(value: 'opt1', label: 'Option 1'), DropdownItem(value: 'opt2', label: 'Option 2'), DropdownItem(value: 'opt3', label: 'Option 3'), ], onChanged: (v) => setState(() => _value = v), motion: const DropdownMotion( durationMs: 240, exitEasing: 'easeInOut', ), ); }}| Prop | Type | Default | Notes |
|---|---|---|---|
value | String | required | Currently-selected item value |
items | List | required | Pass Strings or DropdownItem(value, label) |
onChanged | ValueChanged<String> | required | Fired when the user picks an item |
disabled | bool | false | Locks interaction; renders disabled style |
width | double? | null | Trigger width; null = fill parent constraints |
placement | DropdownPlacement | auto | auto flips on viewport space; top / bottom force |
motion | DropdownMotion? | null | Per-instance motion override; null = use registry defaults |
open | bool? | null | Controlled-open mode. Pair with onOpenChange |
onOpenChange | ValueChanged<bool>? | null | Fired when open state changes |
- The snippet above reflects the currently-published snapshot’s
DropdownMotionoverrides; 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: 252incident, 2026-05-14). Pass a concrete width only when the layout demands it.