Skip to content
PixiKit

Site Navbar

A site header: brand with a small tag, links that dim until hovered, a thin marker that slides under the current link, dropdowns that drop in on hover, two buttons, and a folding menu on narrow widths.

pixikit.com/docs/components/site-navbar

Customize

Height64px
Position
Nav align
Background color
Blur0px
Border color
Text color
Inactive opacity0.50
Font size16.0px
Item padding x20px
Marker height2.0px
Marker color
Duration0.30s
Dropdown trigger
Dropdown width150px
Dropdown radius20px
Close delay0.15s
Mobile breakpoint720px

Props

33
NameTypeDefaultDescription
brandstring"Northwind"Brand name at the left.
brandHrefstring"#"Where the brand links to.
badgestring"Beta"Small tag beside the brand. Leave empty for none.
itemsSiteNavbarItem[]SAMPLEThe links. A sample set shows when left out.
activestringNoneLabel of the current page, when you hold it.
defaultActivestringNoneLabel of the current page at first.
onNavigate(label: string) => voidNoneCalled with the label of a clicked link.
primaryLabelstring"Join us"Text of the filled button at the right. Leave empty for none.
primaryHrefstring"#join"
secondaryLabelstring"Sign in"Text of the outlined button at the right. Leave empty for none.
secondaryHrefstring"#sign-in"
actionsReactNodeNoneYour own buttons at the right; replaces the two built-in ones.
heightnumber64Bar height, in px.
position"static" | "sticky" | "fixed""sticky"How the bar is placed in the page.
navAlign"start" | "center" | "end""start"Where the links sit between the brand and the buttons.
backgroundColorstring"var(--background)"Bar fill.
blurnumber0Blur of the page under the bar, in px. Needs a see-through fill.
borderColorstring"var(--border)"Colour of the hairline under the bar and of the outlines.
textColorstring"var(--foreground)"Text colour.
inactiveOpacitynumber0.5Opacity of links that are not current or hovered.
fontSizenumber16Link size, in px.
itemPaddingXnumber20Space left and right of each link, in px.
markerHeightnumber2Thickness of the marker under the current link, in px.
markerColorstring"var(--foreground)"Marker colour.
durationnumber0.3Seconds the marker takes to slide.
dropdownTrigger"hover" | "click""hover"What opens a dropdown. Click and the keyboard always work.
dropdownWidthnumber150Dropdown width, in px.
dropdownRadiusnumber20Dropdown corner radius, in px.
closeDelaynumber0.15Seconds a dropdown waits before closing after the pointer leaves.
mobileBreakpointnumber720Bar width under which the links fold into a menu button, in px.
menuLabelstring"Menu"Screen reader text of the menu button.
classNamestring""
styleCSSPropertiesNone

More navigation components in Pro

View all

Related