vbDropdown

Bulma documentationopen in new windowComponent sourceopen in new window

A dropdown menu.

Slots

default

The default slot is the (html) button to display as the dropdown's trigger; it is the element that will be clicked to open the dropdown.

This slot is to be used to template the layout of the dropdown's items. The dropdown item is bound to the data property.

Props

alignment

Type: 'left'| 'right'| undefined

The alignment of the dropdown menu.

content

Required

Type: any[]

Default: []

The content of the dropdown; null will render a dropdown divider

tag

Type: string | undefined

Default: div

The tag to hold all the dropdown items

itemTag

Type: string | undefined

Default: p

The tag to wrap each dropdown item in.

isHoverable

Type: boolean | undefined

Default: false

Whether the dropdown opens on mouse hover

isDropup

Type: boolean | undefined

Default: false

Whether the dropdown opens upwards

Emits

itemClick

function itemClick(item: any, event: Event, element: HTMLElement): void {}

Emitted when a dropdown item is clicked

  • item - the item value of the clicked dropdown item
  • event - the click event
  • element - the clicked dropdown item element