navigation
Provides users the ability to navigate an application.
Import
Import just the navigation styles.
@import "@winnie-ui/css/spatial/navigation";@import "@winnie-ui/css/visual/navigation";
Anatomy
Attach the appropriate data
attributes in the structure below.
<ul data-component="navigation"> <li> <a data-component="navigation-item"> <i data-slot="icon" /> <span data-slot="label" /> </a> </li> <ul data-component="navigation-group"> <li> <a data-component="navigation-item"> <i data-slot="icon" /> <span data-slot="label" /> <button data-slot="action" /> </a> </li> </ul> <li> <div data-component="navigation-item"> <i data-slot="icon" /> <span data-slot="label" /> <button data-slot="action" /> </div> <ul data-component="navigation-group"> <li> <a data-component="navigation-item"> <i data-slot="icon" /> <span data-slot="label" /> <button data-slot="action" /> </a> </li> </ul> </li></ul>
Examples
Radius
Use the data-radius
attribute to change the radius.
Icon
Add an icon with the icon
slot attribute as a child of the navigation item.
Action
Add an action with the action
slot attribute as a child of the navigation item.
Group
Add a group with the navigation-group
component.
Disabled
Use the data-disabled
or aria-disabled
attributes to mark a navigation item as disabled.
Current
Use the data-current
or aria-current
attributes to identify the current pages’ navigation item.
Reference
navigation-item
Groups all of the parts of the item together.