Skip to main content
Version: Next

Dropdown API

import { Dropdown } from '@editora/ui-react';

Props​

PropTypeDescription
align'start' | 'end'Which trigger edge the menu lines up with. Unset: the start edge, or the end edge when the menu would otherwise run off the window.
childrenReact.ReactNode
closeOnSelectboolean
density'default' | 'compact' | 'comfortable'
elevation'default' | 'none' | 'low' | 'high'
onChange(open: boolean) => void
onChangeDetail(detail: { open: boolean; reason?: string }) => void
onClose() => void
onOpen() => void
onRequestClose(detail: { reason: string }) => void
onSelect(detail: { value?: string; label?: string; checked?: boolean; item?: HTMLElement }) => void
openboolean
placement'top' | 'bottom' | 'left' | 'right'
radiusnumber | string
shape'default' | 'square' | 'soft' | 'rounded' | 'pill'
size'sm' | 'md' | 'lg' | '1' | '2' | '3'
tone'default' | 'brand' | 'neutral' | 'info' | 'danger' | 'success' | 'warning'
typeaheadboolean
variant| 'default' | 'surface' | 'soft' | 'filled' | 'outline' | 'flat' | 'line' | 'minimal' | 'ghost' | 'glass' | 'solid' | 'contrast'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

PropTypeDescription
as'div' | 'section' | 'ul' | 'nav'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

PropTypeDescription
captionReact.ReactNode
checkedboolean
childrenReact.ReactNode
iconReact.ReactNodeAn Editora icon name ("settings"), or your own element.
labelstring
roleDropdownItemRole
shortcutReact.ReactNode
tone'danger' | 'success' | 'warning'
valuestring

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

PropTypeDescription
childrenReact.ReactNode

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-dropdown>​

Dropdown renders the ui-dropdown custom element from @editora/ui-core, which can also be used without React.

Attributes: align, aria-describedby, aria-label, aria-labelledby, close-on-scroll, close-on-select, density, disabled, elevation, open, placement, radius, shape, size, tone, typeahead, variant

Events: change, close, open, request-close, select, ui-request-close