Navbar

Build top-level navigation with grouped actions and responsive states.

Navbar

Interactive configuration

s-navbar is a composable top-navigation shell. Color, surface, size, groups, scroll behavior, and detail treatments can all be adjusted in this single example.

Types

interface NavItem {
  text?: string
  ariaLabel?: string
}

interface NavLink extends NavItem {
  path: string
  target?: string
}

type NavbarItem = NavLink

API

PROPS

Property
Type
Values
Description
default
Example
More
variant
String
surfacefloatingtransparent
Surface treatment of the navigation shell.
surface
—
position
String
staticstickyfixed
Positioning strategy for the navigation shell.
static
—
size
String
compactmediumspacious
Navigation height and internal density.
medium
—
blurred
Boolean
truefalse
Use a blurred glass surface.
false
—
content-width
Number, String
CSS length
Maximum width of the inner content.
100%
—
gap
Number, String
CSS length
Gap between brand, navigation, and action regions.
12
—
collapse-at
Number
pixels
Container width where opted-in collapsed regions are hidden.
560
—
fixed
Boolean
truefalse
Defines if the component is fixed on the screen.
false
shadow
Boolean
truefalse
Add a shadow to the component.
primary
shadow-scroll
Boolean
truefalse
Add functionality to add shadow to component when scrollTop is more than 0.
false
hide-scroll
Boolean
truefalse
Add the functionality to hide and show the component based on whether the scroll is lowered or raised.
false
textWhite
Boolean
truefalse
Change the text color of items to white.
false
square
Boolean
truefalse
Change the border radius to 0 by making the component square.
false
padding-scroll
Boolean
truefalse
Determines if the component has padding and the user scrolling is removed making an effect.
false
not-line
Boolean
truefalse
Delete the active line in the component.
false
left-collapsed
Boolean
truefalse
Add the functionality that when the elements of this slot cannot be correctly they are visually removed.
false
center-collapsed
Boolean
truefalse
Add the functionality that when the elements of this slot cannot be correctly they are visually removed.
false
right-collapsed
Boolean
truefalse
Add the functionality that when the elements of this slot cannot be correctly they are visually removed.
false
target-scroll
Boolean
truefalse
Determines the element to which the scroll event will be requested.
document
item:disabled
Boolean
truefalse
Disable selection and navigation.
false
—
item:icon
String
icon name
Render a registered icon before the label.
—
—
item:badge
String, Number
null
Render compact status after the label.
—
—
item:active
Boolean
truefalse
Determines if the component is in active status.
false
item:to
String, Object
vue-router RouteLocationRaw
Use vue-router to generate a new view based on the supplied string.
false
item:link
Object
NavLink
Use to navigate the site
false

EVENTS

Event
Type
Description
default
Example
More
update:modelValue
String
Fires when the active navigation item changes.
—
—
collapsed
Boolean
Fires when the responsive collapsed state changes.
—
—

SLOTS

Slot
Scope
Description
default
Example
More
brand
{ collapsed: boolean; scrolled: boolean }
Brand region; takes priority over the legacy left slot.
—
—
navigation
{ collapsed: boolean; scrolled: boolean }
Primary navigation region; takes priority over the default slot.
—
—
actions
{ collapsed: boolean; scrolled: boolean }
Action region; takes priority over the legacy right slot.
—
—
default
{ collapsed: boolean; scrolled: boolean }
Add the elements in the center of the component.
—
left
{ collapsed: boolean; scrolled: boolean }
Add the elements on the left side of the component.
—
right
{ collapsed: boolean; scrolled: boolean }
Add the elements on the right side of the component.
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied