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:
-
ClassDescriptionA masthead contains global properties such as logotype, navigation and settings in an organized fashion, and it is accessible from all parts of the application.The brand/logo area within a
Mastheadcomponent.Container for the content of aMastheadcomponent.The logo element within aMastheadBrand.Container for the main area of aMastheadcomponent.Container for the toggle of aMastheadcomponent.The page component is used to define the basic layout of a page with either vertical or horizontal navigation.Container to group multiplePageSectionLikecontainers.Container for the main page area.Groups common methods/modifiers for page sections likePageBreadcrumbandPageSection.Common interface for page sections likePageBreadcrumbandPageSection.Container for the page sidebar.Container within thePageSidebarto hold content.