Child component of Block

Overview

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

Sample

Best practices

A Block Section containing supplemental GIS reading resources. The Block Section is shown in its collapsed and expanded states to toggle the visual representation of supplemental GIS readings.
Do consider using Block Sections to save space when content is not essential.
Do use the text property to provide context to a user when Block Section content is collapsed.
A Block Section that contains a terms and conditions form. When expanded, the Block Section provides context. When collapsed, essential information on the terms and conditions is not displayed.
Avoid using Block Sections to display essential information. When the component is collapsed slotted content will not be visible.

API reference

Properties

PropertyAttributeDescriptionTypeDefault
expandedexpanded

When true, expands the component and its contents.

booleanfalse
iconEndicon-end

Specifies an icon to display at the end of the component.

IconName
iconFlipRtlicon-flip-rtl

Displays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl").

FlipContext
iconStarticon-start

Specifies an icon to display at the start of the component.

IconName
messageOverrides

Overrides individual strings used by the component.

Record<string, unknown> | undefined
openopen
deprecatedin v3.1.0, removal target v6.0.0 - Use expanded prop instead.

When true, expands the component and its contents.

booleanfalse
scalescale

Specifies the size of the component.

Scale"m"
statusstatus
deprecatedin v2.8.1, removal target v6.0.0 - Use icon-start instead.

Displays a status-related indicator icon.

Status
texttext

The component header text.

string
toggleDisplaytoggle-display

Specifies how the component's toggle is displayed, where:

"button" sets the toggle to a selectable header, and

"switch" sets the toggle to a switch.

BlockSectionToggleDisplay"button"

Slots

NameDescription
default (unnamed)

A slot for adding custom content.

Styles

NameDescription
--calcite-block-section-background-color

Specifies the component's background color.

--calcite-block-section-border-color

Specifies the component's border color. When expanded, applies to the component's bottom border.

--calcite-block-section-header-text-color

Specifies the component's header text color.

--calcite-block-section-text-color

Specifies the component's text color.

--calcite-block-section-text-color-hover

Specifies the component's text color on hover.

--calcite-block-section-content-space

Specifies the padding of the component's content in default slot.

Events

NameDescriptionBehavior
calciteBlockSectionCollapse

Fires when the component's content area is collapsed.

bubblescomposed
calciteBlockSectionExpand

Fires when the component's content area is expanded.

bubblescomposed
calciteBlockSectionToggle

Fires when the header has been clicked.

bubblescomposed

Methods

NameDescriptionSignature
componentOnReady

Creates a promise that resolves once the component is fully loaded.

componentOnReady(): Promise<this>
setFocus

Sets 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.