Skip to content

Navbar

The bar across the top: your sections on the left, and search, versions and the theme toggle on the right.

Declaring it

Theme.defaults
|> Theme.navbar
    [
        NavbarSection("Guide", "guide", "guide/getting-started.md")
        NavbarDropdown(
            "Reference",
            [
                NavbarDescribed("API", "Types and functions", "/reference/")
                NavbarDivider
                NavbarLink("Changelog", "/changelog/")
            ]
        )
    ]
|> Theme.navbarEnd
    [
        NavbarDynamicWidget Search.trigger
        NavbarLocalePicker
        NavbarIcon("GitHub", "https://github.com/you/project", Icons.github)
    ]
ItemWhat it is
NavbarSection(label, section, url)A link that lights up while the reader is in that section, and decides which sidebar they see
NavbarLink(label, url)An ordinary link
NavbarDropdown(label, items)A menu, holding any of the others
NavbarDescribed(label, description, url)A link with a line under it, for dropdowns
NavbarDividerA rule inside a dropdown
NavbarIcon(label, url, svg)Icon only - Icons.github and friends are provided
NavbarLocalePickerThe languages of the site, linking to this page's translation
NavbarWidget html / NavbarDynamicWidget renderMarkup from a plugin - search and the version switcher arrive this way

Navbar is the left side, NavbarEnd the right.

An item's url is a page's source file, written as the menu writes it, or a path inside the site starting with /. Either way the theme adds the base url and the version prefix, so write neither. Anything else is used as written.

Around the page

OptionEffect
EditUrlBaseAdds "Edit this page", resolved against the page's path in your repository
FooterMarkup under every page
HeadExtraMarkup in every <head> - stylesheets, fonts, analytics
FavIconPath to the icon
Theme.defaults
|> Theme.editUrl "https://github.com/you/project/edit/main"
|> Theme.footer (Html.p [ Html.text "© 2026 You" ])
|> Theme.favIcon "/favicon.svg"
Edit this page