Skip to content

Block Section

Child component of Block

Overview

Blocks sections can help organize and group content within a Block.

Sample

API reference

Properties

PropertyAttributeDescriptionTypeDefault
expandedexpandedWhen true, the component is expanded to show child components.booleanfalse
iconEndicon-endSpecifies an icon to display at the end of the component.string
iconFlipRtlicon-flip-rtlDisplays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl")."both" | "end" | "start"
iconStarticon-startSpecifies an icon to display at the start of the component.string
messageOverridesUse this property to override individual strings used by the component.{ collapse?: string; expand?: string; }
openopen
deprecatedUse expanded prop instead.
When true, expands the component and its contents.
booleanfalse
statusstatus
deprecatedUse icon-start instead.
Displays a status-related indicator icon.
"idle" | "invalid" | "valid"
texttextThe component header text.string
toggleDisplaytoggle-displaySpecifies how the component's toggle is displayed, where: "button" sets the toggle to a selectable header, and "switch" sets the toggle to a switch."button" | "switch""button"

Slots

NameDescription
default (unnamed)A slot for adding custom content.

Styles

NameDescription
--calcite-block-section-background-colorSpecifies the component's background color.
--calcite-block-section-border-colorSpecifies the component's border color. When expanded, applies to the component's bottom border.
--calcite-block-section-header-text-colorSpecifies the component's header text color.
--calcite-block-section-text-colorSpecifies the component's text color.
--calcite-block-section-text-color-hoverSpecifies the component's text color on hover.

Events

NameDescriptionBehavior
calciteBlockSectionToggleFires when the header has been clicked.bubblescomposed

Methods

NameDescriptionSignature
componentOnReadyCreate a promise that resolves once component is fully loaded.componentOnReady(): Promise<void>
setFocusSets focus on the component's first tabbable element.setFocus(): Promise<void>

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