NNuartz

Layout & Components

Updated 2026-03-193 min read

How nuartz structures its layout and the key React components you can customize.

nuartz uses the Next.js App Router with a component-based layout. Unlike Quartz's custom component system, nuartz uses standard React components styled with Tailwind CSS.

Layout structure

The root layout (apps/web/app/layout.tsx) defines the page shell:

┌─────────────────────────────────────────────┐
│  Header (logo, mobile nav, theme toggle)    │
├──────────┬──────────────────────────────────┤
│          │                                  │
│ Sidebar  │         Main Content             │
│ (nav)    │  ┌─────────────┬────────────┐    │
│          │  │  Article    │  ToC / Graph│    │
│          │  │             │  Backlinks  │    │
│          │  └─────────────┴────────────┘    │
│          │                                  │
├──────────┴──────────────────────────────────┤
  • Header (components/layout/header.tsx) — top bar with site title, mobile hamburger menu, and theme toggle
  • NavSidebar (components/layout/nav-sidebar.tsx) — left sidebar with file tree navigation, hidden on mobile
  • Main content — rendered markdown with table of contents and graph view in the right column

Key components

Layout components

ComponentFilePurpose
Headercomponents/layout/header.tsxTop navigation bar
NavSidebarcomponents/layout/nav-sidebar.tsxFile tree sidebar
MobileNavcomponents/layout/mobile-nav.tsxMobile slide-out navigation
LayoutShellcomponents/layout/layout-shell.tsxPage content wrapper

Content components

ComponentFilePurpose
TableOfContentscomponents/toc.tsxRight-side heading navigation
GraphViewcomponents/graph-view.tsxInteractive note graph
Backlinkscomponents/backlinks.tsxPages linking to current page
Breadcrumbcomponents/breadcrumb.tsxPath breadcrumbs
FileExplorercomponents/file-explorer.tsxFolder tree browser
CommandPalettecomponents/command-palette.tsxCmd+K search
HeadingAnchorscomponents/heading-anchors.tsxClickable heading links
MermaidRenderercomponents/mermaid-renderer.tsxMermaid diagram rendering
ThemeTogglecomponents/theme-toggle.tsxLight/dark mode switch

UI primitives

Reusable primitives live in components/ui/ — button, badge, card, dialog, sheet, scroll-area, tooltip, etc. These follow shadcn/ui conventions.

Customizing the layout

Since nuartz uses standard React and Tailwind, customization is straightforward:

Modifying the sidebar

Edit components/layout/nav-sidebar.tsx to change what appears in the left sidebar. The component receives a tree prop built from your content directory structure.

Changing the page layout

The root layout in app/layout.tsx controls the overall page structure. You can adjust column widths, hide the sidebar, or rearrange sections by editing the Tailwind classes.

Adding components to pages

The catch-all page route (app/[...slug]/page.tsx) renders individual content pages. Add or remove components (graph view, backlinks, table of contents) here.

Responsive behavior

nuartz uses Tailwind breakpoints for responsive design:

  • Mobile (< lg): sidebar hidden, hamburger menu in header
  • Desktop (lg+): sidebar visible, full layout

There is no MobileOnly / DesktopOnly wrapper — use Tailwind's hidden lg:block and lg:hidden classes directly.

Styling

Global styles are in apps/web/app/globals.css. Component-specific styles use Tailwind utility classes. CSS variables control theming (colors, spacing, sidebar width) and are defined in globals.css.