Navbar
A responsive navigation header that includes support for branding, navigation, forms and more.
Basic Example
Here’s an example of the basic components included in a <i-navbar> that automatically collapses responsively.
Sizes
You’re able to use the size modifier to control the size of your navbar, using one of the available sizes: sm, md, and lg. The default size is set to md.
Variants
Inkline includes two predefined navbar styles. You can set the style of a <i-navbar> using the variant property, which can have a value of light or dark. By default, modals use the light variant.
Dropdown
You can use an <i-dropdown> component inside the <i-nav> component to create a contextual navbar menu.
Learn more about the Dropdown component.
Nav Placement
You can position the <i-nav> component to the start, end, or center of the <i-navbar-collapsible> component using flexbox utilities.
Learn more about the Nav component.
Navbar Collapsing
You can control at which breakpoint your navbar will collapse at using the collapse property. By default, the navbar will collapse on the md screen size, but you can use any breakpoint value.
Always or Never Collapsible
Besides the breakpoint values, you can use a boolean value to set your navbar to be always collapsible, or never collapsible.
Setting a collapse value of true will set the navbar to be always collapsible.
Setting a collapse value of false will set the navbar to never be collapsible.
Manual Collapse
Sometimes, it’s necessary to control whether the collapsed Navbar is open or not programmatically. Fort that, you can use the v-model directive.
Linking and Routing
Nav items will be automatically converted to link anchors <a> when providing a href property. You can also specify target and rel properties.
The <i-nav-item> component is well integrated with the Vue Router plugin and will be converted to a <router-link> when using the to property.
Learn more about the Nav Item component.
Active State
You can control the active state of your <i-nav-item> using the active property. When you provide a to property you’re converting the component into a router-link, therefore you can use the active-class and exact-active-class properties and set them to -active.
Learn more about the Nav Item component.
Configuration
Props
Use props to modify the component’s design and behavior.
- Property
collapseOnItemClickTypeBooleanDefaulttrueDescription Determines if the navbar should close when clicking a navbar item - Property
collapseOnClickOutsideTypeBooleanDefaulttrueDescription Determines if the navbar should close when clicking outside - Property
colorType'light' | 'dark'Default'light'Description The color variant of the navbar - Property
fluidTypeBooleanDefaultfalseDescription Display the inner container as fluid, spanning 100% width - Property
sizeType'sm' | 'md' | 'lg'Default'md'Description The size variant of the navbar - Property
menuAnimationType'close' | arrow-up | arrow-down | arrow-left | arrow-right | 'plus' | 'minus'Default'close'Description The animation of the hamburger menu component used for collapsing
Slots
Use slots to insert custom content into well-defined component locations.
- Property
defaultDescription Slot for default navbar content
Events
Use events to react to something happening inside the component.
- Property
update:modelValueDescription Event emitted for setting the modelValue
CSS Variables
Read more about configuring Inkline’s Design System variables to update the look and feel of the component.
- Property
----backgroundValuecolor('light')Description The background of the navbar component - Property
----border-top-colorValuecolor('light-60')Description The border top color of the navbar component - Property
----border-right-colorValuecolor('light-60')Description The border right color of the navbar component - Property
----border-bottom-colorValuecolor('light-60')Description The border bottom color of the navbar component - Property
----border-left-colorValuecolor('light-60')Description The border left color of the navbar component - Property
----border-colorValuevar(----border-top-color) var(----border-right-color) var(----border-bottom-color) var(----border-left-color)Description The border color of the navbar component - Property
----border-styleValuevar(--border-style)Description The border style of the navbar component - Property
----border-top-widthValuevar(--border-top-width)Description The border top width of the navbar component - Property
----border-right-widthValuevar(--border-right-width)Description The border right width of the navbar component - Property
----border-bottom-widthValuevar(--border-bottom-width)Description The border bottom width of the navbar component - Property
----border-left-widthValuevar(--border-left-width)Description The border left width of the navbar component - Property
----border-widthValuevar(----border-top-width) var(----border-right-width) var(----border-bottom-width) var(----border-left-width)Description The border width of the navbar component - Property
----border-top-left-radiusValuevar(--border-top-left-radius)Description The border top left radius of the navbar component - Property
----border-top-right-radiusValuevar(--border-top-right-radius)Description The border top right radius of the navbar component - Property
----border-bottom-right-radiusValuevar(--border-bottom-right-radius)Description The border bottom right radius of the navbar component - Property
----border-bottom-left-radiusValuevar(--border-bottom-left-radius)Description The border bottom left radius of the navbar component - Property
----border-radiusValuevar(----border-top-left-radius) var(----border-top-right-radius) var(----border-bottom-right-radius) var(----border-bottom-left-radius)Description The border radius of the navbar component - Property
----box-shadow-offset-xValuevar(--box-shadow-offset-x)Description The box shadow horizontal offset of the navbar component - Property
----box-shadow-offset-yValuevar(--box-shadow-offset-y)Description The box shadow vertical offset of the navbar component - Property
----box-shadow-blur-radiusValuevar(--box-shadow-blur-radius)Description The box shadow blur radius of the navbar component - Property
----box-shadow-spread-radiusValuevar(--box-shadow-spread-radius)Description The box shadow spread radius of the navbar component - Property
----box-shadow-colorValuevar(--box-shadow-color)Description The box shadow spread radius of the navbar component - Property
----box-shadowValuevar(----box-shadow-offset-x) var(----box-shadow-offset-y) var(----box-shadow-blur-radius) var(----box-shadow-spread-radius) var(----box-shadow-color)Description The box shadow of the navbar component - Property
----font-sizeValuefont-size()Description The font size of the navbar component - Property
----padding-topValuevar(--padding-top)Description The padding top of the navbar component - Property
----padding-rightValue0Description The padding right of the navbar component - Property
----padding-bottomValuevar(--padding-bottom)Description The padding bottom of the navbar component - Property
----padding-leftValue0Description The padding left of the navbar component - Property
----paddingValuevar(----padding-top) var(----padding-right) var(----padding-bottom) var(----padding-left)Description The padding of the navbar component - Property
----colorValuecontrast-color($color-light)Description The color of the navbar component - Property
----item--backgroundValuecolor('light')Description The background of the navbar component item - Property
----item--background--hoverValuecolor('light-55')Description The background of the navbar component item when hovered or focused - Property
----item--colorValuevar(----color)Description The color of the navbar component item - Property
----item--color--hoverValuevar(----color)Description The color of the navbar component item when hovered - Property
----item--padding-topValuecalc(var(--padding-top) / 2)Description The padding top of the navbar component - Property
----item--padding-rightValuevar(--padding-right)Description The padding right of the navbar component - Property
----item--padding-bottomValuecalc(var(--padding-bottom) / 2)Description The padding bottom of the navbar component - Property
----item--padding-leftValuevar(--padding-left)Description The padding left of the navbar component - Property
----item--paddingValuevar(----item--padding-top) var(----item--padding-right) var(----item--padding-bottom) var(----item--padding-left)Description The padding of the navbar component - Property
----collapsed--backgroundValuecolor('light')Description The background of the collapsed navbar component - Property
----collapsed--item--colorValuevar(----color)Description The color of the collapsed navbar component item - Property
----collapsed--item--color--hoverValuevar(----color)Description The color of the collapsed navbar component item when hovered - Property
----collapsed--item--backgroundValuevar(----item--background)Description The background of the collapsed navbar component item - Property
----collapsed--item--background--hoverValuevar(----item--background--hover)Description The background of the collapsed navbar component item when hovered or focused - Property
----brand--margin-rightValuevar(--margin-right)Description The margin right of the navbar component brand