Package org.patternfly.component.page


package org.patternfly.component.page
Provides the PatternFly page layout component and its subcomponents.

The page component provides the overall structure for an application, including a masthead with branding and tools, a sidebar for navigation, and a main content area with sections. It includes support for the masthead, sidebar, page sections, breadcrumbs, navigation, tabs, and groups.

Usage

import static org.patternfly.component.page.Masthead.masthead;
import static org.patternfly.component.page.MastheadBrand.mastheadBrand;
import static org.patternfly.component.page.MastheadContent.mastheadContent;
import static org.patternfly.component.page.MastheadLogo.mastheadLogo;
import static org.patternfly.component.page.MastheadMain.mastheadMain;
import static org.patternfly.component.page.MastheadToggle.mastheadToggle;
import static org.patternfly.component.page.Page.page;
import static org.patternfly.component.page.PageMain.pageMain;
import static org.patternfly.component.page.PageSection.pageSection;
import static org.patternfly.component.page.PageSidebar.pageSidebar;
import static org.patternfly.component.page.PageSidebarBody.pageSidebarBody;

Page page = page()
        .addMasthead(masthead()
                .addMain(mastheadMain()
                        .addToggle(mastheadToggle())
                        .addBrand(mastheadBrand()
                                .addLogo(mastheadLogo("#")
                                        .add("Logo"))))
                .addContent(mastheadContent().text("Header tools")))
        .addSidebar(pageSidebar()
                .addBody(pageSidebarBody()
                        .add("Navigation")))
        .addMain(pageMain("main-id")
                .addSection(pageSection()
                        .text("Section 1"))
                .addSection(pageSection().secondary()
                        .text("Section 2")));
See Also: