Skip to main content

Dropdown Menu

Demo

zeta-web v0.6.6
Web Components

Zeta Dropdown Menu Button places a button that when clicked opens a dropdown menu containing the items passed into it through the items prop.

Storybook

https://design.zebra.com/web/storybook/?path=/docs/components-dropdown--docs

Slots

NameDescriptionType
defaultThe slotted text will be displayed on the dropdown menu button.text

Attributes

NameDescriptionTypeDefault
openControls the state of the dropdown menu.booleanfalse
itemsArray of items to populate the dropdownArray\<ZetaDropdownItem\>[ { label: "Auto Item", icon: "star", checked: false } ]
typeThe type of dropdown.- "text-dropdown" - A dropdown with a default dropdown buttons.- "checkbox-dropdown" - A dropdown with checkboxes.- "radio-dropdown" - A dropdown with radio buttons.'number' | 'text' | 'checkbox' | 'textarea' | 'password' | 'time' | 'date' | 'radio' | 'search' | 'text-dropdown' | 'checkbox-dropdown' | 'radio-dropdown' | 'slider' | 'range-selector' | 'select' | 'stepper'"text-dropdown"
directionThe direction of the droppable relative to the anchor. Defaults to bottom if left undefined."left" | "right" | "bottom" | "top" | undefined"bottom"

Inherited Attributes

NameDescriptionTypeDefaultInherited From
flavorFlavor of component.Values:_ primary - blue background._ secondary - yellow background._ positive - green background._ negative - red background._ outline - primary outline only._ outline-subtle - grey outline only.* text - primary text only.'primary' | 'secondary' | 'positive' | 'negative' | 'outline' | 'outline-subtle' | 'text'"primary"Flavored
nameThe name of the dropdown menu button for form controlstring"default"FormField
autoCapitalizeWhether inputted text is automatically capitalized and how. Only takes effect on non-keyboard entry"none" | "off" | "sentences" | "on" | "words" | "characters" | undefinedundefinedFormField
autoCompleteAutoFill | undefinedundefinedFormField
idThe id of the form control.string""FormField
requiredIndicates whether the form control is required to be filled out before submitting the form.booleanfalseFormField
valueThe value of the Form Control that is submitted when part of a form.string | nullnullFormField
checkedThe state of the Switch or Checkbox that is submitted when part of a form.booleanundefinedFormField
indeterminateThe state of the Switch or Checkbox defined by a mixed or unknown state.booleanfalseFormField
placeholderPlaceholder text shown when value is empty.string | undefinedundefinedFormField
minThe minimum value for number inputsnumber | undefinedundefinedFormField
maxThe maximum value for number inputsnumber | undefinedundefinedFormField
readOnlyPlaceholder text shown when value is empty.boolean | undefinedundefinedFormField
spellCheckWhether to spellcheck the inputboolean | "default" | undefinedundefinedFormField
disabledBoolean for if component is disabled.This will apply disabled styles.booleanfalseFormField
roundedWhether the component is rounded or sharp.When true, rounded will set the border radius of the first child, and any children with class 'contourable-target' to --radius-minimal.Otherwise, this value will be --radius-none.boolean | undefinedtrueContourable
sizeSize of component"small" | "medium" | "large""medium"Size

Figma

https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=22664-32734