Function splitView

Creates a split view component that divides the UI into two sections: main content and sidebar. The split view is centered on the page and provides a clean layout for organizing UI elements.

Either the main content to display or the options object. When an object, it can have the following properties:

Configuration object

Title of the split view

Description of the split view

The main content to display that uses other component blocks

Optional sidebar content that uses other component blocks

A JSX element representing the split view component

  • The split view is designed to create a two-column layout with main content and an optional sidebar
  • The view is automatically centered on the page
  • Both main content and sidebar can contain any valid React elements that is created with other component blocks
  • The component can be used with or without options

Basic usage with main content and sidebar

splitView(
group([
text({ text: 'Main content' }),
inputField({ name: 'mainInput', label: 'Main Input' })
]),
group([
text({ text: 'Sidebar content' }),
inputField({ name: 'sidebarInput', label: 'Sidebar Input' })
])
);

Usage with options, main content, and sidebar

splitView(
{ title: 'Split View Title' },
group([
text({ text: 'Main content' }),
inputField({ name: 'mainInput', label: 'Main Input' })
]),
group([
text({ text: 'Sidebar content' }),
inputField({ name: 'sidebarInput', label: 'Sidebar Input' })
])
);
  • Parameters

    • mainContent: ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[]
    • OptionalsidebarContent: ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[]

    Returns Element

  • Parameters

    • options: SplitViewOptions
    • mainContent: ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[]
    • OptionalsidebarContent: ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[]

    Returns Element