Skip to contents

Create a Block component

Usage

calcite_block(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
collapsiblecollapsibleWhen true, the component is collapsible.booleanTRUE
descriptiondescriptionA description for the component, which displays below the heading.stringFALSE
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
dragDisableddrag-disabledWhen true, and a parent Block Group is dragEnabled, the component is not draggable.booleanTRUE
dragHandledrag-handleWhen true, the component displays a draggable button.booleanTRUE
headingheadingThe component header text.stringFALSE
headingLevelheading-levelSpecifies the heading level of the component's heading for proper document structure, without affecting visual styling.1 | 2 | 3 | 4 | 5 | 6TRUE
iconEndicon-endSpecifies an icon to display at the end of the component.stringTRUE
iconFlipRtlicon-flip-rtlDisplays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl")."both" | "end" | "start"TRUE
iconStarticon-startSpecifies an icon to display at the start of the component.stringTRUE
labellabelSpecifies an accessible name for the component.stringFALSE
loadingloadingWhen true, a busy indicator is displayed.booleanTRUE
menuFlipPlacementsNASpecifies the component's fallback menu placement when it's initial or specified placement has insufficient space available.Check API referenceFALSE
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"TRUE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
openopenWhen true, expands the component and its contents.booleanTRUE
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"TRUE
sortHandleOpensort-handle-openWhen true, displays and positions the sort handle.booleanTRUE
statusstatusDisplays a status-related indicator icon."idle" | "invalid" | "valid"TRUE

Events

The following events are observed by shiny:

EventDescription
calciteBlockBeforeCloseFires when the component is requested to be closed and before the closing transition begins.
calciteBlockBeforeOpenFires when the component is added to the DOM but not rendered, and before the opening transition begins.
calciteBlockCloseFires when the component is closed and animation is complete.
calciteBlockOpenFires when the component is open and animation is complete.
calciteBlockSortHandleBeforeCloseFires when the sort handle is requested to be closed and before the closing transition begins.
calciteBlockSortHandleBeforeOpenFires when the sort handle is added to the DOM but not rendered, and before the opening transition begins.
calciteBlockSortHandleCloseFires when the sort handle is closed and animation is complete.
calciteBlockSortHandleOpenFires when the sort handle is open and animation is complete.
calciteBlockToggleFires when the component's header is clicked.

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding custom content.
actions-endA slot for adding actionable calcite-action elements after the content of the component. It is recommended to use two or fewer actions.
iconDeprecated A slot for adding a leading header icon with calcite-icon. Use icon-start instead.
content-startA slot for adding non-actionable elements before content of the component.
controlDeprecated A slot for adding a single HTML input element in a header. Use actions-end instead.
header-menu-actionsA slot for adding an overflow menu with calcite-actions inside a dropdown menu.

Examples

calcite_block()
#> <calcite-block></calcite-block>