A layout component with a header, sidebar and a content area with two split content options.

Parameters:
NameTypeDescription
propsobject

Component props.

Properties
NameTypeDescription
childrenJSX.Element

React element children.

customAttributesobject

Custom attributes for the layout.

customClassesstring | Array | object

Custom classes for the layout.

HeaderJSX.Element

The header element.

layoutTagNamestring

The tag name for the layout.

SecondaryContentChildrenJSX.Element

The secondary content element.

SideBarChildrenJSX.Element

The sidebar element.

sidebarMobilePositionstring

The position of the sidebar on mobile (start, middle, end).

Since
  • 3.3.0
Returns:

The ModularSidebar component.

Type: 
JSX.Element
Example
import RightSidebar from '@gravityforms/components/react/admin/modules/Layouts/RightSidebar';

<RightSidebar
   Header={ <h1>Header</h1> }
   SideBarChildren={ <div>Primary Sidebar</div> }
   SecondaryContentChildren={ <div>Secondary Sidebar</div> }
   customClasses={ 'my-custom-class' }
   customAttributes={ { 'data-custom-attribute': 'custom' } }
   layoutTagName={ 'section' }
   sidebarMobilePosition="start"
>
  <div>Content</div>
</RightSidebar>