Class PageLayout<T extends PageLayout<T>>

Direct Known Subclasses:
AppShellLayout, DashboardLayout, DocsLayout, EmptyStateLayout, ErrorLayout, FeatureGridLayout, FormLayout, HeroLayout, LoadingLayout, MasterDetailLayout, RegionLayout, SettingsLayout, StoryLayout, WizardLayout

public abstract class PageLayout<T extends PageLayout<T>> extends StyledElement<T>
Abstract base class for pre-built page layout templates.

PageLayout provides a foundation for full-page layout patterns commonly used in web applications. All layouts extend this base class to gain common functionality like viewport filling, overflow management, and consistent styling patterns.

Subclasses include:

Common methods:


 layout.fillViewport()      // 100vw x 100vh
 layout.fillParent()        // 100% x 100%
 layout.setMinHeight("100vh")
 
Since:
2025
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • PageLayout

      protected PageLayout()
      Constructs a PageLayout with default flexbox column layout.
  • Method Details

    • createPane

      protected Div createPane()
      Creates a styled pane element for use as a layout region.
      Returns:
      a new div with auto overflow
    • createPane

      protected Div createPane(String cssClass)
      Creates a styled pane with a specific CSS class.
      Parameters:
      cssClass - the CSS class to add
      Returns:
      a new div with the class and auto overflow
    • fillViewport

      public T fillViewport()
      Sets the layout to fill the full viewport (100vw x 100vh).
      Returns:
      this PageLayout for method chaining
    • fillParent

      public T fillParent()
      Sets the layout to fill its parent container (100% x 100%).
      Returns:
      this PageLayout for method chaining
    • setMinHeight

      public T setMinHeight(String minHeight)
      Sets a minimum height for the layout.
      Overrides:
      setMinHeight in class StyledElement<T extends PageLayout<T>>
      Parameters:
      minHeight - the minimum height value (e.g., "100vh", "500px")
      Returns:
      this PageLayout for method chaining
    • setBackgroundColor

      public T setBackgroundColor(String color)
      Sets the background color for the entire layout.
      Overrides:
      setBackgroundColor in class StyledElement<T extends PageLayout<T>>
      Parameters:
      color - the background color
      Returns:
      this PageLayout for method chaining