Dock

DDock renders daisyUI's fixed bottom navigation bar; DDockItem takes an Icon (), a Label and an Active state. The dock is fixed to the viewport bottom, so it floats above this page — click it to move the active tab.

Interactive— The dock is app chrome fixed to the viewport bottom — click an item to move the active tab.

Active tab: Home

<DDock>
    <DDockItem Label="Home" Href="/" Active="@(_activeTab == "Home")"
               Icon="@DaisyIcon.FromUrl("home", "https://api.iconify.design/lucide/home.svg")"
               @onclick='() => _activeTab = "Home"' />
    <DDockItem Label="Steps" Href="components/steps" Active="@(_activeTab == "Steps")"
               Icon="@DaisyIcon.FromUrl("footprints", "https://api.iconify.design/lucide/footprints.svg")"
               @onclick='() => _activeTab = "Steps"' />
    <DDockItem Label="Menu" Href="components/menu" Active="@(_activeTab == "Menu")"
               Icon="@DaisyIcons.Bars"
               @onclick='() => _activeTab = "Menu"' />
    <DDockItem Label="Hero" Href="components/hero" Active="@(_activeTab == "Hero")"
               Icon="@DaisyIcon.FromUrl("sparkles", "https://api.iconify.design/lucide/sparkles.svg")"
               @onclick='() => _activeTab = "Hero"' />
</DDock>
 
@code {
    private string _activeTab = "Home";
}

Tips

  • Icon takes a DaisyIcon: a built-in from DaisyIcons (Menu uses DaisyIcons.Bars) or a CDN icon via DaisyIcon.FromUrl (Home, Steps and Hero use lucide glyphs from the Iconify API).
  • Active adds dock-active and aria-current="page".
  • Sizes: pass Size on DDock (dock-xs … dock-lg).

API

DDock

Parameters

Name Type Default Binding Description
Size DaisySize Medium — Dock size ( dock-xs ... dock-lg ).
ExtraSmallSmallMediumLargeExtraLarge
ChildContent RenderFragment — — The dock items ( DDockItem children).
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
DDockItem

Parameters

Name Type Default Binding Description
Href string — — Link target. Defaults to # (callback-only items).
Label string — — Text under the icon.
Icon DaisyIcon — — Icon (e.g. DaisyIcons.Bars or a CDN icon via DaisyIcon.FromUrl ).
IconSize DaisySize Large — Icon size for Icon .
ExtraSmallSmallMediumLargeExtraLarge
Active bool False — Marks the item as active ( dock-active + aria-current ).
OnClick EventCallback<MouseEventArgs> — — Click handler.
Class string — — Additional CSS classes appended to the component's computed daisyUI classes.
Style string — — Inline styles applied to the root element.
Connection lost — reconnecting…
Connection failed.
The server has stopped.