YuhuanStudioYunUIDocs
Patterns

PageLayout

Full-height page shell — navbar slot, offset main area, footer slot.

The standard full-height page shell: a navbar slot, a flex-1 main area offset to clear the fixed navbar, and a footer slot. Navbar and footer are passed as slots (typically YunUI's <Navbar/> and <Footer/>), so the shell stays decoupled from their props. The default pt-28 on <main> clears YunUI's fixed navbar — override it via mainClassName for a taller or shorter bar.

Import

import { PageLayout } from "@yuhuanowo/yunui/patterns";

Example

Pass <Navbar/> and <Footer/> as slots; set hideFooter for focused pages and transparentBg to paint your own backdrop.

PageLayout

navbar slot
main content
footer slot

Props

PropTypeDefaultDescription
children*ReactNodePage content, rendered inside `<main>`.
classNamestringExtra classes on the outer wrapper.
footerReactNodeBottom slot — typically `<Footer/>`. Hidden when `hideFooter`.
hideFooterbooleanfalseDrop the footer (e.g. focused/app pages).
mainClassNamestringOverride the `<main>` classes — defaults to `flex-1 pt-28` (clears the fixed navbar). Pass your own offset for a taller/shorter bar.
navbarReactNodeTop navigation slot — typically `<Navbar/>`. Rendered above `<main>`.
transparentBgbooleanfalseSkip the default `bg-background` so a page can paint its own backdrop.

On this page