DropdownItem

constructor(text: String, enabled: Boolean = true, selected: Boolean = false, onClick: () -> Unit? = null, icon: @Composable (Modifier) -> Unit? = null, summary: String? = null, children: List<DropdownItem>? = null, hint: @Composable () -> Unit? = null, alert: Boolean = false)

Parameters

text

Text shown for the item.

enabled

Whether the item can be clicked.

selected

Whether the item is selected.

onClick

Callback invoked when the item is clicked. Ignored when children is non-null and non-empty (the click is consumed by the cascading layer to expand the submenu).

icon

Optional icon shown before text.

summary

Optional summary shown below text.

children

Optional submenu items. When non-null and non-empty, this item becomes a submenu trigger: cascading dropdown popups render a chevron and open a child popup on click, recursively. Stabilize this list (e.g. via remember) to avoid unnecessary recomposition.

hint

Optional trailing hint slot rendered between the title block and the selection indicator (COUI popup_list_window_item_hint_layout). Suitable for a badge, a red dot, or a short count; it is width-capped at DropdownDefaults.HintMaxWidth and, matching COUI DefaultAdapter.setHint, hidden entirely while the row is disabled.

alert

Whether this is an alert (destructive) item. Its title is tinted with DropdownColors.alertContentColor (COUI ITEM_TYPE_ALERT → couiColorError).


constructor(icon: @Composable (Modifier) -> Unit? = null, title: String? = null, summary: String? = null)

SpinnerEntry compatibility