Skip to main content

Panel

Use Panels to structure a screen. Panels may contain Tiles, may be scrollable, and optionally searchable.

tip

To learn more about how to use Panels refer to the Panel pattern documentation.

Example

Live Editor
Result
Loading...

Usage Rules

Do:

  • Use Panels to establish the basic layout structure of any Adjust application
  • Use the default Panel variant most of the time
  • Use the contrast variant exclusively to create areas where you want to place Tiles.

Don’t:

  • Nest panel deeper than one level
  • Use search input without title

Variants

Appearance

Panels come with two different background color variations: default and contrast. Use the contrast variant exclusively to create areas where you want to place Tiles.

Live Editor
Result
Loading...

Custom Borders

You can decide whether a border should be rendered on every side in the Panel. Use borders props for this. It should be an array with 4 items where every items defines a border for an appropriate side: first value - top side, second - right side, third - bottom side, fourth - left side.

Live Editor
Result
Loading...

Searchable

Panels can be searchable. The search query may life-update the Panel’s content. Use onSearch callback for this.

Live Editor
Result
Loading...

Title

Live Editor
Result
Loading...

Examples

Tiles

Use the contrast variant exclusively to create areas where you want to place Tiles.

Live Editor
Result
Loading...

Scrollable

Use the css prop and set height to make the Panel scrollable. When there is a scroll you'll have a shadow on top and bottom depending on scroll position.

Live Editor
Result
Loading...

Page Layout with the Panels

The following example demonstrates the usage of borders prop to correctly set up borders when you layout your application with Panels.

Live Editor
Result
Loading...

Props

NameTypeDefault
title
The title of the Panel
string
onSearch
This callback fires when a user types into the search input. Provide this prop to make the Panel searchable.
((text: string) => void)
placeholderSearchInput
Placeholder for the search input. Native HTML attribute: Link
string
"Search"
padding
"default" will create a default paddding in the body of the panel.
"default" | "none"
"default"
appearance
Use 'contrast' appearance when placing a Tile inside the Panel
"default" | "contrast"
"default"
borders
This array should contain 4 values, where every value will render a border for the appropriate side. The order: top, right, bottom, left
boolean[]
"[true, true, true, true]"
children
The content of the panel
ReactNode
css
Add custom styles to this component. Use with caution. Learn more here: Link
SupportedStyleAttributes
inputFieldCss
SupportedStyleAttributes
data-{foo}
Data attributes can be used by testing libraries to retrieve components or assert their existence
string
* - the prop is required.