Examples
Activator is the trigger, ChildContent holds the li items of the menu.
Export
Placement puts the panel on any side of the trigger, or aligns it to the End.
Top
Bottom
Left
Right
Start
End
Hover="true" opens the panel on mouse-over, with no click.
Hover for environments
Open forces the panel open, and ContentClass styles it (here wider, with titles and icons).
Ana Silva
API
<Dropdown>
DaisyBlazorParameters
- ActivatorClass string= null
Extra CSS classes merged onto the <summary> trigger, e.g. "btn btn-primary" to make the trigger itself a styled button. Use this instead of a <Button> inside Activator: a button nested in a summary swallows the click and the dropdown never opens.
- ContentClass string= null
Extra CSS classes forwarded to the .dropdown-content wrapper.
- Hover bool= false
When true, adds .dropdown-hover so the panel opens on mouse-over (CSS only).
- Open bool= false
Forces the dropdown open via the HTML open attribute and .dropdown-open class.
- Placement DropdownPlacement?= null
Placement of the dropdown content relative to the trigger.
- Class string= null
Extra CSS classes merged onto the root .dropdown element.
- Style string= null
Inline CSS styles applied to the root .dropdown element.
Content
- Activator RenderFragment
The trigger element rendered inside the <summary> tag.
- ChildContent RenderFragment
The dropdown panel content (typically a <ul> menu list).