Skip to content

Dropdown

<bh-dropdown> | BharatDropdown

The Dropdown component provides a customizable selection menu that allows users to choose one option from a list. It supports multiple styling options, sizes, and variants to match your application’s design.

Basic Usage

Interactive Playground

Experiment with different properties of the dropdown component.

Open in flex-shrink: 0; flex-shrink: 0;

Option 1

Option 2

Option 3

Option 4

Basic Properties

State Options

Size Variations

The dropdown component supports different size options to fit your design needs.

Open in flex-shrink: 0; flex-shrink: 0;
Option 1Option 2Option 3Option 1Option 2Option 3Option 1Option 2Option 3

Complex Menu Example

A dropdown with multiple sections separated by dividers.

Open in flex-shrink: 0; flex-shrink: 0;
New ItemOpenSaveExportImportDelete

Disabled Dropdown Items

You can disable specific dropdown items to prevent user selection also apply divider to dropdown option using disabled attribute

Properties

PropertyTypeDescription
sizestringSize of the dropdown (small, medium, large)
variantstringStyle variant (normal, gradient, tricolor, outlined, link, etc.)
labelstringDefault label text shown when no item is selected
roundingnumberBorder radius in em units
disabledbooleanWhether the dropdown is disabled
openbooleanWhether the dropdown menu is open
selectedIndexnumberIndex of the currently selected item (-1 if none)
hrefstringURL to navigate to when using the link variant

The <bh-dropdown-item> component has the following properties:

PropertyTypeDescription
valuestringValue associated with this dropdown item
disabledbooleanWhether the dropdown item is disabled