Skip to main content
Elastic UI
Elastic UI
ComponentsPatternsContentData visualization
EUI ChangelogGitHubFigma
  • Guidelines
    • Getting started
    • Accessibility
    • Writing
    • Testing
  • Theming
    • Theme provider
    • Color mode
    • High contrast mode
    • Borders
    • Breakpoints
    • Colors
    • Sizing
    • Typography
  • Templates
    • Page template
    • Sitewide search
  • Layout
    • Accordion
    • Bottom bar
    • Flex
    • Flyout
    • Header
    • Horizontal rule
    • Modal
    • Page components
    • Page header
    • Panel
      • Guidelines
      • Split panels
    • Popover
    • Resizable container
    • Spacer
  • Navigation
    • Breadcrumbs
    • Buttons
    • Collapsible nav
    • Context menu
    • Facet
    • Key pad menu
    • Link
    • Pagination
    • Side nav
    • Steps
    • Tabs
    • Tree view
  • Display
    • Aspect ratio
    • Avatar
    • Badge
    • Callout
    • Card
    • Comment list
    • Description list
    • Drag and drop
    • Empty prompt
    • Health
    • Icons
    • Image
    • List group
    • Loading
    • Progress
    • Skeleton
    • Stat
    • Text
    • Timeline
    • Title
    • Toast
    • Tooltip
    • Tour
  • Forms
    • Form controls
    • Form layouts
    • Form validation
    • Text controls
    • Numeric controls
    • Selection controls
    • Search and filter controls
    • Date and time controls
    • Other controls
  • Tabular content
    • Tables
    • Data grid
  • Editors & Syntax
    • Code
    • Markdown
  • Utilities
    • Accessibility
    • Auto sizer
    • Beacon
    • Color palettes
    • Copy
    • CSS utility classes
    • Delay
    • Error boundary
    • Focus trap
    • Highlight and mark
    • HTML ID generator
    • I18n
    • Inner text
    • Mutation observer
    • Outside click detector
    • Overlay mask
    • Portal
    • Pretty duration
    • Provider
    • Resize observer
    • Scroll
    • Text diff
    • Text truncation
    • Window events
  • EUI
  • Layout
  • Panel

Panel

EuiPanel is a building block component. Use it as a layout helper for containing content. It is also commonly used as a base for other larger components like

EuiPage, EuiPopover and EuiCard.

Padding

The most basic use is to simply add padding around your content.

Loading...

Shadow and border

EuiPanel can give depth to your container with

hasShadow while hasBorder can add containment. Just be sure not to include too many nested panels with these settings.

Certain allowed combinations of shadow, border, and color depend on the current theme.

For instance, only plain or transparent panels can have a border and/or shadow. The default theme doesn't allow combining the hasBorder option with hasShadow.

Loading...

Colors and corners

Use color to add background shading to your panel and provide an additional helpful aesthetic to your container in context. Be mindful to use color sparingly. You can also remove the rounded corners depending on the placement of your panel with borderRadius="none"

Passing color="transparent" can give you a quick empty box simply for adding padding to all sides.

Loading...

Growing height

Using EuiPanel in an EuiFlexItem will always grow its height to match. This is great for rows of panels. However, you can also turn this feature off by setting grow={false}.

Loading...

Props

EuiPanel

Extends ButtonHTMLAttributes
𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
element#
↦
Description and type
Type: "button" | "div"
↦
Default value
↵
Prop
hasShadow#
↦
Description and type

Adds a medium shadow to the panel;
Only works when color="plain"

Type: boolean
↦
Default value
true
↵
Prop
hasBorder#
↦
Description and type

Adds a slight 1px border on all edges.
Only works when color="plain | transparent"

Type: boolean
↦
Default value
false
↵
Prop
paddingSize#
↦
Description and type

Padding for all four sides

Type: "xs" | "s" | "m" | "l" | "xl" | "none"
↦
Default value
m
↵
Prop
borderRadius#
↦
Description and type

Corner border radius

Type: "m" | "none"
↦
Default value
m
↵
Prop
grow#
↦
Description and type

When true the panel will grow in height to match EuiFlexItem

Type: boolean
↦
Default value
true
↵
Prop
panelRef#
↦
Description and type
Type: Ref<HTMLDivElement>
↦
Default value
↵
Prop
color#
↦
Description and type

Background color of the panel;
Usually a lightened form of the brand colors

Type: PanelColor
↦
Default value
plain
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type
Type: string
↦
Default value
↵
Prop
data-test-subj#
↦
Description and type
Type: string
↦
Default value
↵
Prop
css#
↦
Description and type
Type: Interpolation<Theme>
↦
Default value
↵
𐘂𐘂
Edit this page

Previous
Page header
Next
Guidelines
  • Padding
  • Shadow and border
  • Colors and corners
  • Growing height
  • Props
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with ❤ by Elastic