NavLink
ImplementedPrimary-navigation anchor with a built-in active-state underline indicator. Bundles label + indicator (atom convention). Presentational: the consumer decides `active` (e.g. from the current route) so the atom stays framework-agnostic.
components/atoms/NavLink/NavLink.tsxNavigation link atom with active state + horizontal padding for desktop header nav. D-HOME-P2d 2026-08-11 (added px-3 for menu breathing room).
Usage
import { NavLink } from '@epasslive/design-system'
<NavLink href="/events" active={pathname.startsWith('/events')}>
Events
</NavLink>D-HOME-P2d changelog (2026-08-11)
- Added
px-3horizontal padding (12px) — was 0px, caused menu items to touch on desktop - Combined with
py-2vertical padding for 44x44px tap target (WCAG 2.5.5)
Accessibility
Semantic <a> element. Active state announced viaaria-current="page" (set by parent). 44x44px min tap target via the --ep-tap-min token (min-h-[var(--ep-tap-min)]).
Props
href*stringLink destination.
children*React.ReactNodeVisible link text.
activebooleanfalseWhen true, applies the active visual style (e.g. teal underline).
classNamestringAdditional CSS classes merged onto the <a>.
Props
hrefstring—Destination URL
childrenReact.ReactNode—Link label content
activebooleanfalseMarks the link as the current page (accent color + underline)
classNamestring''Extra utility classes appended to the anchor
<NavLink />Accessibility
Type
1 ruleARIA
1 ruleUsage
Import
Example 1
Anti-patterns
— Do not compose atoms directly — use molecules instead
— Avoid inline styles on atoms