SubNav
SubNav is in-flow navigation for a section of your app. it accepts nested links and native disclosure groups, so you can keep a documentation tree or account settings together without another fixed navbar.
usage
<script>
import { SubNav } from '@ciabi/loafkit-ui';
const items = [
{ label: 'Get started', href: '/docs/introduction/' },
{ label: 'Customize', href: '/docs/foundations/flavors/', collapsible: true, children: [
{ label: 'Flavors', href: '/docs/foundations/flavors/' },
{ label: 'Artwork', href: '/docs/foundations/app-artwork/' }
] }
];
</script>
<SubNav {items} currentPath="/docs/foundations/flavors/" label="Reading room guides" />links and groups
labels are keyed within each list, so keep sibling labels unique.
currentPath controls aria-current="page". matching ignores one trailing slash; it doesn’t parse search parameters or determine your app’s route automatically. pass the current pathname rather than a complete URL.
API reference
SubNav
SectionLink
one item supplied to SubNav.
label-
destination/group label; keep sibling labels unique.
href-
destination URL; adds Overview inside a collapsible group.
children-
nested destinations or groups.
collapsible-
uses native details/summary for children.
open-
initial disclosure state; otherwise current descendants open the group.