The reloadDocument option controls whether clicking the logo triggers a full page reload (true,
the default) or uses client-side SPA navigation (false). A full reload is useful when your landing
page is served by a different system (e.g. a CMS) outside of Zudoku.
Direction (RTL/LTR)
Set the text direction for your site. This is useful for right-to-left languages:
Your component will be rendered whenever a user navigates to a route that doesn't exist. This works
in both development and production builds.
Here's an example of a custom 404 component:
Code
import { Button, Link } from "zudoku/components";export const NotFound = () => ( <section className="flex items-center justify-center py-20"> <div className="text-center max-w-lg mx-auto"> <p className="text-6xl font-extrabold text-primary mb-4">404</p> <h1 className="text-3xl font-bold mb-4">Page not found</h1> <p className="text-muted-foreground mb-8"> The page you're looking for doesn't exist or has been moved. </p> <Button asChild> <Link to="/">Go back home</Link> </Button> </div> </section>);
Layout
Collapsible Sidebar
The navigation sidebar is collapsible by default. A small toggle button on the sidebar's right
border lets users hide and reveal it. Configure the behavior under site.sidebar:
Code
{ site: { sidebar: { collapsible: true, // default: true. Set to false to disable the toggle entirely. toggleVisibility: "always", // "always" (default) or "hover" — show button only when hovering the sidebar's right edge togglePosition: "bottom", // "top", "center", or "bottom" (default) }, }}
For finer vertical placement, override the --sidebar-toggle-y CSS variable in your stylesheet:
Code
:root { --sidebar-toggle-y: 30%;}
The toggle button carries aria-expanded="true" when the sidebar is open and "false" when
collapsed. Combine it with the [data-sidebar-toggle] selector to position the button differently
per state: