- With Section
- Without Section
- Prop Table
import { NavSection } from '@duik/it'
import NavSection from '@duik/nav-section'
NavSection adds some extra whitespacing to add some visual order to your coded application. It is a simple div with some css properties. Don't miss full example of how to build a navigation with nav elements here.
<NavPanel dark> <NavSection> <NavSectionTitle> Section title 1 </NavSectionTitle> <NavLink> Item 1 </NavLink> <NavLink> Item 2 </NavLink> </NavSection> <NavSection> <NavSectionTitle> Section title 2 </NavSectionTitle> <NavLink> Item 1 </NavLink> <NavLink> Item 2 </NavLink> </NavSection> </NavPanel> <nav class="nav-panel-dark"> <div class="nav-section"> <span class="nav-section-title">Section title 1</span> <a class="nav-link"> <span class="nav-link-text">Item 1</span> </a> <a class="nav-link"> <span class="nav-link-text">Item 2</span> </a> </div> <div class="nav-section"> <span class="nav-section-title">Section title 2</span> <a class="nav-link"> <span class="nav-link-text">Item 1</span> </a> <a class="nav-link"> <span class="nav-link-text">Item 2</span> </a> </div> </nav> ReactHTML Snippet |
<NavPanel dark> <NavSectionTitle> Section title 1 </NavSectionTitle> <NavLink> Item 1 </NavLink> <NavLink> Item 2 </NavLink> <NavSectionTitle> Section title 2 </NavSectionTitle> <NavLink> Item 1 </NavLink> <NavLink> Item 2 </NavLink> </NavPanel> <nav class="nav-panel-dark"> <span class="nav-section-title">Section title 1</span> <a class="nav-link"> <span class="nav-link-text">Item 1</span> </a> <a class="nav-link"> <span class="nav-link-text">Item 2</span> </a> <span class="nav-section-title">Section title 2</span> <a class="nav-link"> <span class="nav-link-text">Item 1</span> </a> <a class="nav-link"> <span class="nav-link-text">Item 2</span> </a> </nav> ReactHTML Snippet |
Any props you would pass to div
.