Sidebar
A responsive navigation sidebar that includes support for branding, navigation, forms and more.
Basic Example
Here’s an example on how to use the <i-sidebar> inside a dashboard layout. The sidebar automatically collapses responsively.
Page with Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Sizes
You’re able to use the size modifier to control the size of your sidebar, using one of the available sizes: sm, md, and lg. The default size is set to md.
Small Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Medium Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Large Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Variants
Inkline includes two predefined sidebar styles. You can set the style of a <i-sidebar> using the variant property, which can have a value of light or dark. By default, modals use the light variant.
Light Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Dark Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Placement
You can easily place your sidebar on the left or right side of a layout by setting the placement property . By default, sidebars are on the left side.
Left Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Right Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Collapsible Menu
You can use an <i-collapsible> component with one or more <i-collapsible-item> components inside the <i-nav> component to create a contextual sidebar menu.
Learn more about the Collapsible component.
Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Sidebar Collapsing
You can control at which breakpoint your sidebar will collapse at using the collapse property. By default, the sidebar will collapse on the md screen size, but you can use any breakpoint value.
Sidebar
Example content for a page with a sidebar that collapses on large screens, a layout typically seen in Documentation pages and Web Application dashboards.
Always or Never Collapsible
Besides the breakpoint values, you can use a boolean value to set your sidebar to be always collapsible, or never collapsible.
Setting a collapse value of true will set the sidebar to be always collapsible.
Sidebar
Example content for a page with a sidebar that collapses on large screens, a layout typically seen in Documentation pages and Web Application dashboards.
Setting a collapse value of false will set the sidebar to never be collapsible.
Sidebar
Example content for a page with a sidebar that collapses on large screens, a layout typically seen in Documentation pages and Web Application dashboards.
Collapse Position
You can set the collapsed sidebar position to relative, absolute or fixed using the collapse-position property.
This property allows you to control whether the sidebar will affect the content that it is next to it when reaching the collapse breakpoint.
Sidebar Collapse Relative
Example content for a page with a sidebar that collapses on large screens, a layout typically seen in Documentation pages and Web Application dashboards.
Sidebar Collapse Absolute
Example content for a page with a sidebar that collapses on large screens, a layout typically seen in Documentation pages and Web Application dashboards.
Sidebar Collapse Fixed
Example content for a page with a sidebar that collapses on large screens, a layout typically seen in Documentation pages and Web Application dashboards.
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.
Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
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.
Sidebar
Example content for a page with a sidebar, a layout typically seen in Documentation pages and Web Application dashboards.
Configuration
Props
Use props to modify the component’s design and behavior.
- Property
ariaLabelTypeStringDefaultSidebarDescription The aria-label of the sidebar - Property
collapseOnItemClickTypeBooleanDefaulttrueDescription Determines if the sidebar should close when clicking a sidebar item - Property
collapseOnClickOutsideTypeBooleanDefaulttrueDescription Determines if the sidebar should close when clicking outside, on the overlay - Property
collapsePositionType'fixed' | 'absolute' | 'relative'Default'absolute'Description The collapse position of the sidebar - Property
colorType'light' | 'dark'Default'light'Description The color variant of the sidebar - Property
placementType'left' | 'right'Default'left'Description The placement of the sidebar - Property
sizeType'sm' | 'md' | 'lg'Default'md'Description The size variant of the navbar
Slots
Use slots to insert custom content into well-defined component locations.
- Property
defaultDescription Slot for default sidebar 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 sidebar component - Property
----border-top-colorValuecolor('light-60')Description The border top color of the sidebar component - Property
----border-right-colorValuecolor('light-60')Description The border right color of the sidebar component - Property
----border-bottom-colorValuecolor('light-60')Description The border bottom color of the sidebar component - Property
----border-left-colorValuecolor('light-60')Description The border left color of the sidebar 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 sidebar component - Property
----border-styleValuevar(--border-style)Description The border style of the sidebar component - Property
----border-top-widthValuevar(--border-top-width)Description The border top width of the sidebar component - Property
----border-right-widthValuevar(--border-right-width)Description The border right width of the sidebar component - Property
----border-bottom-widthValuevar(--border-bottom-width)Description The border bottom width of the sidebar component - Property
----border-left-widthValuevar(--border-left-width)Description The border left width of the sidebar 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 sidebar component - Property
----border-top-left-radiusValuevar(--border-top-left-radius)Description The border top left radius of the sidebar component - Property
----border-top-right-radiusValuevar(--border-top-right-radius)Description The border top right radius of the sidebar component - Property
----border-bottom-right-radiusValuevar(--border-bottom-right-radius)Description The border bottom right radius of the sidebar component - Property
----border-bottom-left-radiusValuevar(--border-bottom-left-radius)Description The border bottom left radius of the sidebar 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 sidebar component - Property
----box-shadow-offset-xValuevar(--box-shadow-offset-x)Description The box shadow horizontal offset of the sidebar component - Property
----box-shadow-offset-yValuevar(--box-shadow-offset-y)Description The box shadow vertical offset of the sidebar component - Property
----box-shadow-blur-radiusValuevar(--box-shadow-blur-radius)Description The box shadow blur radius of the sidebar component - Property
----box-shadow-spread-radiusValuevar(--box-shadow-spread-radius)Description The box shadow spread radius of the sidebar component - Property
----box-shadow-colorValuevar(--box-shadow-color)Description The box shadow spread radius of the sidebar 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 sidebar component - Property
----colorValuecontrast-color($color-light)Description The color of the sidebar component - Property
----font-sizeValuefont-size()Description The font size of the sidebar component - Property
----padding-topValuevar(--padding-top)Description The padding top of the sidebar component - Property
----padding-rightValuevar(--padding-right)Description The padding right of the sidebar component - Property
----padding-bottomValuevar(--padding-bottom)Description The padding bottom of the sidebar component - Property
----padding-leftValuevar(--padding-left)Description The padding left of the sidebar component - Property
----paddingValuevar(----padding-top) var(----padding-right) var(----padding-bottom) var(----padding-left)Description The padding of the sidebar component - Property
----widthValue14remDescription The width of the sidebar component - Property
----z-indexValuez-index('fixed')Description The z-index of the sidebar component - Property
----item--colorValuecontrast-color($color-light)Description The color of the sidebar component item - Property
----item--color--hoverValuecontrast-color($color-light)Description The color of the sidebar component item when hovered - Property
----item--backgroundValuecolor('light')Description The background of the sidebar component item - Property
----item--background--hoverValuecolor('light-55')Description The background of the sidebar component item when hovered or focused - Property
----item--border-top-left-radiusValuevar(----border-top-left-radius)Description The border top left radius of the sidebar component item - Property
----item--border-top-right-radiusValuevar(----border-top-right-radius)Description The border top right radius of the sidebar component item - Property
----item--border-bottom-right-radiusValuevar(----border-bottom-right-radius)Description The border bottom right radius of the sidebar component item - Property
----item--border-bottom-left-radiusValuevar(----border-bottom-left-radius)Description The border bottom left radius of the sidebar component item - Property
----item--border-radiusValuevar(----item--border-top-left-radius) var(----item--border-top-right-radius) var(----item--border-bottom-right-radius) var(----item--border-bottom-left-radius)Description The border radius of the sidebar component item - Property
----item--padding-topValuecalc(var(--padding-top) / 2)Description The padding top of the sidebar component item - Property
----item--padding-rightValuevar(--padding-right)Description The padding right of the sidebar component item - Property
----item--padding-bottomValuecalc(var(--padding-bottom) / 2)Description The padding bottom of the sidebar component item - Property
----item--padding-leftValuevar(--padding-left)Description The padding left of the sidebar component item - Property
----item--paddingValuevar(----item--padding-top) var(----item--padding-right) var(----item--padding-bottom) var(----item--padding-left)Description The padding of the sidebar component item - Property
----overlay--backgroundValuergba(0, 0, 0, 0.5)Description The background of the sidebar component overlay