Skip to content

Panel

Panel is a container that can house interactions as well as live within other Calcite Components.

Overview

Panel provides a header with heading text and a summary. There are slots to add Actions and Icons to the start and end of the header. Panel's main content area is a blank container.

Panel works well with Shell Panel and Flow. Combine Panels within Flow for an out-of-the-box drill-in experience.

Usage

  • Accommodate content that has an associated heading, and if applicable a description and/or Actions
  • Provide a drilled-in workflow with Flow
  • Contain a List

Sample

Accessibility

Keyboard navigation

KeyFunction
TabMoves focus to the next focusable element. If the currently focused element is the last, focus will leave the component.
Tab and ShiftMoves focus to the previous focusable element. If the currently focused element is the first, focus will leave the component.

API reference

Properties

PropertyAttributeDescriptionTypeDefault
beforeClosePasses a function to run before the component closes.() => Promise<void>
closableclosableWhen present, displays a close button in the trailing side of the header.booleanfalse
closedclosedWhen present, the component will be hidden.booleanfalse
collapsedcollapsedWhen present, hides the component's content area.booleanfalse
collapseDirectioncollapse-directionWhen collapsible is present, specifies the direction of the collapse icon."down" | "up""down"
collapsiblecollapsibleWhen present, the component is collapsible.booleanfalse
descriptiondescriptionA description for the component.string
disableddisabledWhen present, interaction is prevented and the component is displayed with lower opacity.booleanfalse
headingheadingThe component header text.string
headingLevelheading-levelSpecifies the heading level of the component's heading for proper document structure, without affecting visual styling.1 | 2 | 3 | 4 | 5 | 6
iconiconSpecifies an icon to display.string
iconFlipRtlicon-flip-rtlWhen present, the icon will be flipped when the element direction is right-to-left ("rtl").booleanfalse
loadingloadingWhen present, a busy indicator is displayed.booleanfalse
menuFlipPlacementsSpecifies the component's fallback menu placement when it's initial or specified placement has insufficient space available.Array<"top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end" | "leading-start" | "leading" | "leading-end" | "trailing-end" | "trailing" | "trailing-start">
menuOpenmenu-openWhen present, the action menu items in the header-menu-actions slot are open.booleanfalse
menuPlacementmenu-placementDetermines where the action menu will be positioned."auto" | "auto-end" | "auto-start" | "bottom" | "bottom-end" | "bottom-start" | "leading" | "leading-end" | "leading-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start" | "trailing" | "trailing-end" | "trailing-start""bottom-end"
messageOverridesUse this property to override individual strings used by the component.Record<string, unknown>
overlayPositioningoverlay-positioningDetermines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed"."absolute" | "fixed""absolute"
scalescaleSpecifies the size of the component."l" | "m" | "s""m"

Slots

NameDescription
default (unnamed)A slot for adding custom content.
action-barA slot for adding a calcite-action-bar to the component.
alertsA slot for adding calcite-alerts to the component.
content-bottomA slot for adding content below the unnamed (default) slot and above the footer slot (if populated)
content-topA slot for adding content above the unnamed (default) slot and below the action-bar slot (if populated).
header-actions-startA slot for adding actions or content to the start side of the header.
header-actions-endA slot for adding actions or content to the end side of the header.
header-contentA slot for adding custom content to the header.
header-menu-actionsA slot for adding an overflow menu with actions inside a calcite-dropdown.
fabA slot for adding a calcite-fab (floating action button) to perform an action.

Styles

NameDescription
--calcite-panel-corner-radiusSpecifies the component's corner radius.
--calcite-panel-heading-text-colorSpecifies the text color of the component's heading.
--calcite-panel-icon-colorSpecifies the color of the component's icon.
--calcite-panel-description-text-colorSpecifies the text color of the component's description.
--calcite-panel-border-colorSpecifies the component's border color.
--calcite-panel-background-colorSpecifies the component's background color.
--calcite-panel-header-background-colorSpecifies the background color of the component's header.
--calcite-panel-header-action-background-colorSpecifies the background color of Panel's closable, collapsible, and elements slotted in header-menu-actions.
--calcite-panel-header-action-background-color-hoverSpecifies the background color of Panel's closable, collapsible, and elements slotted in header-menu-actions when hovered.
--calcite-panel-header-action-background-color-pressSpecifies the background color of Panel's closable, collapsible, and elements slotted in header-menu-actions when pressed.
--calcite-panel-header-action-text-colorSpecifies the text color of Panel's closable, collapsible, and elements slotted in header-menu-actions.
--calcite-panel-header-action-text-color-pressSpecifies the text color of Panel's closable, collapsible, and elements slotted in header-menu-actions when pressed or hovered.
--calcite-panel-spaceSpecifies the padding of the component's "unnamed (default)" slot.
--calcite-panel-header-content-spaceSpecifies the padding of the "header-content" slot.
--calcite-popover-border-colorSpecifies the border color of the component's internally rendered calcite-popover, which is rendered within a calcite-action menu when slotted calcite-actions are present in the header-actions-end slot. Applies to any slotted calcite-popovers.
--calcite-panel-content-space
deprecated Use --calcite-panel-space instead. Specifies the padding of the component's content.
--calcite-panel-header-border-block-end
deprecated Use --calcite-panel-border-color instead. Specifies the component header's block end border.

Events

NameDescriptionBehavior
calcitePanelCloseFires when the close button is clicked.bubblescomposedcancelable
calcitePanelCollapseFires when the component's content area is collapsed.bubblescomposed
calcitePanelExpandFires when the component's content area is expanded.bubblescomposed
calcitePanelScrollFires when the content is scrolled.bubblescomposed
calcitePanelToggleFires when the collapse button is clicked.bubblescomposed

Methods

NameDescriptionSignature
componentOnReadyCreate a promise that resolves once component is fully loaded.componentOnReady(): Promise<void>
scrollContentToScrolls the component's content to a specified set of coordinates.scrollContentTo(options?: ScrollToOptions): Promise<void>
setFocusSets focus on the component's first focusable element.setFocus(options?: FocusOptions): Promise<void>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.