Skip to content

Dropdown Header Plugin

The dropdown-header plugin adds a customizable header section to the top of the dropdown panel. Use it for titles, instructions, or action links.

Usage

Configuration

AttributeDescriptionDefault
data-plugin-dropdown-header-titleTitle text displayed in the header""
data-plugin-dropdown-header-htmlCustom HTML content for the header
data-plugin-dropdown-header-classAdditional CSS class for the header element""

Custom HTML Header

For more complex headers, use the HTML attribute:

Styling

The header uses the .ds-dropdown-header CSS class:

css
.dot-select .ds-dropdown-header {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

The header appears above the search input:

MIT Licensed