RetailysUI

Layout & Navigation

Five sidebar navigation variants, header navigation, mobile responsive patterns, and the theme system. These building blocks define the application shell.

Header Navigation

An alternative to sidebar navigation -- a horizontal header with primary and secondary nav rows.

HeaderNavigation

Primary header row (h-16, md: h-18) with logo, navigation items, settings, notifications, and avatar dropdown. A secondary header row auto-appears when the active item has sub-items. On mobile, the navigation collapses into a drawer overlay.

Primary Row

Logo + nav items + settings + notifications + avatar

Secondary Row

Auto-appears when active item has sub-items

Mobile

Collapses to drawer overlay

HeaderNavigation Props

PropTypeDefaultDescription
activeUrlstring-Currently active URL
items*NavItem[]-Primary navigation items
subItemsNavItem[]-Secondary nav items (overrides auto-detection)
trailingContentReactNode-Content on the right side
showAvatarDropdownbooleantrueShow avatar dropdown menu
hideBorderboolean-Hide borders

Mobile Navigation

All navigation variants include built-in mobile responsiveness via MobileNavigationHeader.

MobileNavigationHeader

Every sidebar variant automatically renders a mobile header on screens below the lg breakpoint (1024px). The mobile header provides a consistent experience across all navigation styles.

h-16 header bar with logo, theme toggle, and hamburger menu button

Modal overlay renders the full sidebar content in a slide-in panel

Animated transitions with smooth slide-in and slide-out

Auto-dismiss on backdrop click or navigation

Theme System

The design system supports light and dark themes via CSS custom properties and next-themes.

Theme Toggle Variants

Button and switch styles at all available sizes.

sm
md
lg
switch
with label

Implementation

How the theme system is wired up.

ThemeProvider from next-themes

Uses the class strategy with attribute="class".

CSS class switching

.light-mode and .dark-mode classes on the root element toggle the theme.

CSS custom properties

Variables defined in theme.css automatically remap all semantic tokens between light and dark palettes.

System preference detection

enableSystem allows automatic theme selection based on the user's OS preference.

ThemeToggle Props

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"Toggle button size
showLabelbooleanfalseShow 'Light'/'Dark' label

Page Layout Pattern

The standard page layout used across all pages in this design manual.

Standard Layout Structure

Sidebar

292px

Sticky Header (h-16)

Main Content (max-w-7xl)

px-4 py-8 md:px-8 md:py-12

Key Characteristics

Sidebar + content layout using flex min-h-dvh lg:flex-row

Sticky header with sticky top-0 z-40 and backdrop blur

Content area constrained to max-w-7xl with responsive padding

Hidden on mobile — sidebar is replaced by MobileNavigationHeader below lg

Responsive Patterns

Tailwind CSS breakpoints used throughout the design system for responsive layout transitions.

Breakpoints

The standard Tailwind breakpoint scale and how each is used in the layout system.

sm

640px

Mobile landscape

md

768px

Tablet

lg

1024px

Desktop (sidebar appears)

xl

1280px

Large desktop

2xl

1536px

Ultra-wide

Layout Behavior by Breakpoint

BreakpointNavigationContent
< lgMobileNavigationHeader + drawer overlayFull width, px-4 py-8
lgSidebar visible, sticky header appearsFlex-1 beside sidebar, max-w-7xl
xl+Same as lg, wider content areaIncreased horizontal padding, px-8 py-12