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, expands the component and its contents.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.Record<string, unknown>
openopen
deprecatedUse expanded prop instead.
When true, expands the component and its contents.
booleanfalse
scalescaleSpecifies the size of the component."l" | "m" | "s""m"
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.
--calcite-block-section-content-spaceSpecifies the padding of the component's content in default slot.

Events

NameDescriptionBehavior
calciteBlockSectionCollapseFires when the component's content area is collapsed.bubblescomposed
calciteBlockSectionExpandFires when the component's content area is expanded.bubblescomposed
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(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.