Sidebar item #
Used as link in your VaSidebar.
Examples #
Simple usage example #
VaSidebarItem is used with VaSidebarContent (to create paddings) and VaSidebarTitle (to fill all remaining width in VaSidebarItem)
Colors #
You can change sidebar default colors
Highlight active VaSidebarItem #
VaSidebarItemIt is possible to have multiple VaSidebarItem highlighted. You can choose your own way to highlight an active item. Even if you want to activate a few VaSidebarItems.
VaSidebarTitle and VaIcons #
VaSidebarTitle and VaIconsVaSidebarTitle used to fill all remaining free space in VaSidebarItem. We can also add any other components (like VaIcon, VaChip or VaButton).
Advanced case with VaAccordion #
VaAccordionVaSidebarItem can be used with VaAccordion and VaCollapses.
API #
Props #
| Name | Description | Types | Default |
|---|---|---|---|
| active | If |
|
|
| activeClass | Applied when the link is active. More info here. |
| - |
| activeColor | Used to set accent color for active |
|
|
| append | When set, always appends the relative path to the current path. More info here. |
| - |
| borderColor | Color CSS style |
| - |
| disabled | Applies |
|
|
| exact | Exactly match the link. Without this, '/' will match every route. More info here. |
| - |
| exactActiveClass | Applied when the link is active with exact match. More info here. |
| - |
| hoverColor | Used to set accent color for hovered |
| - |
| hoverOpacity | Used to set opacity of the color for hovered |
|
|
| href | Designates the component as anchor and applies the href attribute. More info here. |
| - |
| preset | Named preset combination of component props. |
| - |
| replace | When set, calls |
| - |
| tag | Replaces html tag. This is useful for semantics and also to allow for valid markup in some cases ( |
|
|
| target | Navigation target, More info here. |
| - |
| textColor | Text color (theme string or HEX string). |
| - |
| to | The target route of the link. More info here. |
| - |