For AI agents: the complete documentation index is available at /ooui-react/en/llms.txt, the full documentation bundle is available at /ooui-react/en/llms-full.txt, and this page is available as Markdown at /ooui-react/en/components/page-layout/index.md.
  • English
  • PageLayout

    Source | Original component

    A page panel: an item of StackLayout's options array. You rarely render it directly — put it into StackLayout's options instead.

    Standalone use

    Standalone, the active state is declared via active; without active it derives from hidden (not hidden = active) and outputs the oo-ui-pageLayout-active class. label / value are fields carried along with the page-set object — the component swallows them so they never land as DOM attributes.

    First page content
    import { PageLayout, StackLayout } from "ooui-react";
    
    function App() {
      return (
        <StackLayout
          value="a"
          options={[
            { value: "a", label: "First page", padded: true, children: "First page content" },
            { value: "b", label: "Second page", padded: true, children: "Second page content" },
          ]}
        />
      );
    }
    
    export default App;

    API

    Inherits all PanelLayout props, plus:

    PropDescriptionTypeDefault
    activeWhether this is the active page; without it, derived from hidden (not hidden = active)booleanderived from hidden
    scrollableWhether scrollable (pages scroll by default)booleantrue
    label / valueCarried with the page-set object, swallowed by the componentReactNode / string | number—

    See also