- Full Light Example
- Full Dark Example
Building navigation (side) panels is a simple task, as the kit provides some handy components to make this work super easy. Nav panels come in light and dark mode, you can control this by simply adding "dark" prop to the NavPanel. See examples below or you can also discover the API for each component.
<NavPanel> <NavTitle> My Navigation </NavTitle> <NavSection> <NavSectionTitle> Default Link Styles </NavSectionTitle> <NavLink> Nav Item </NavLink> <NavLink className="active"> Active Nav Item </NavLink> <NavLink leftEl="🏀"> With left el </NavLink> <NavLink leftEl={<Icon>love</Icon>} rightEl="3"> With left and right el </NavLink> </NavSection> <NavSection> <NavSectionTitle> Pill Link Styles </NavSectionTitle> <NavLink pill> Nav Item </NavLink> <NavLink className="active" pill> Active Nav Item </NavLink> <NavLink leftEl="🏀" pill> With left el </NavLink> <NavLink leftEl={<Icon>love</Icon>} pill rightEl="3"> With left and right el </NavLink> </NavSection> </NavPanel> <nav class="nav-panel"> <span class="nav-title">My Navigation</span> <div class="nav-section"> <span class="nav-section-title">Default Link Styles</span> <a class="nav-link"> <span class="nav-link-text">Nav Item</span> </a> <a class="nav-link active"> <span class="nav-link-text">Active Nav Item</span> </a> <a class="nav-link"> <span class="nav-link-text"> <span class="nav-link-left-el">🏀</span>With left el </span> </a> <a class="nav-link"> <span class="nav-link-text"> <span class="nav-link-left-el"> <i class="uikon">love</i> </span>With left and right el </span> <span class="nav-link-right-el">3</span> </a> </div> <div class="nav-section"> <span class="nav-section-title">Pill Link Styles</span> <a class="nav-link-pill"> <span class="nav-link-text">Nav Item</span> </a> <a class="nav-link-pill active"> <span class="nav-link-text">Active Nav Item</span> </a> <a class="nav-link-pill"> <span class="nav-link-text"> <span class="nav-link-left-el">🏀</span>With left el </span> </a> <a class="nav-link-pill"> <span class="nav-link-text"> <span class="nav-link-left-el"> <i class="uikon">love</i> </span>With left and right el </span> <span class="nav-link-right-el">3</span> </a> </div> </nav> ReactHTML Snippet |
As you can see, the only difference is that we passed "dark" prop to the NavPanel component. Simple as that!
<NavPanel dark> <NavTitle> My Navigation </NavTitle> <NavSection> <NavSectionTitle> Default Link Styles </NavSectionTitle> <NavLink> Nav Item </NavLink> <NavLink className="active"> Active Nav Item </NavLink> <NavLink leftEl="🏀"> With left el </NavLink> <NavLink leftEl={<Icon>love</Icon>} rightEl="3"> With left and right el </NavLink> </NavSection> <NavSection> <NavSectionTitle> Pill Link Styles </NavSectionTitle> <NavLink pill> Nav Item </NavLink> <NavLink className="active" pill> Active Nav Item </NavLink> <NavLink leftEl="🏀" pill> With left el </NavLink> <NavLink leftEl={<Icon>love</Icon>} pill rightEl="3"> With left and right el </NavLink> </NavSection> </NavPanel> <nav class="nav-panel-dark"> <span class="nav-title">My Navigation</span> <div class="nav-section"> <span class="nav-section-title">Default Link Styles</span> <a class="nav-link"> <span class="nav-link-text">Nav Item</span> </a> <a class="nav-link active"> <span class="nav-link-text">Active Nav Item</span> </a> <a class="nav-link"> <span class="nav-link-text"> <span class="nav-link-left-el">🏀</span>With left el </span> </a> <a class="nav-link"> <span class="nav-link-text"> <span class="nav-link-left-el"> <i class="uikon">love</i> </span>With left and right el </span> <span class="nav-link-right-el">3</span> </a> </div> <div class="nav-section"> <span class="nav-section-title">Pill Link Styles</span> <a class="nav-link-pill"> <span class="nav-link-text">Nav Item</span> </a> <a class="nav-link-pill active"> <span class="nav-link-text">Active Nav Item</span> </a> <a class="nav-link-pill"> <span class="nav-link-text"> <span class="nav-link-left-el">🏀</span>With left el </span> </a> <a class="nav-link-pill"> <span class="nav-link-text"> <span class="nav-link-left-el"> <i class="uikon">love</i> </span>With left and right el </span> <span class="nav-link-right-el">3</span> </a> </div> </nav> ReactHTML Snippet |