Skip to main content

StageActionBox

caution

This component is intended to be used as a direct child of the Stage component.
Using it as a such may result in unexpected behaviours.

StageActionBox is used to display a call to action box with a button.

Import

// with @dhl-official/react-library:
import { DhlStageActionBox } from "@dhl-official/react-library"
// with @dhl-official/ui-libraries/react-library:
import { DhlStageActionBox } from "@dhl-official/ui-libraries/react-library"

Code

<DhlStageActionBox
headlinePriority="h2"
icon={VolumeHigh}
link={{
"ariaLabel": "Download now",
"dataTestid": "actionboxLink-cy",
"href": "http://www.example.com",
"target": "_blank",
"children": "Download now"
}}
>
Content
<span slot="headline">
slot headline content
</span>
<span slot="subline">
slot subline content
</span>
<span slot="stageLink">
slot stageLink content
</span>
</DhlStageActionBox>

Interactive Demo (in the context of Stage)

Migrating from DUIL 1.0

  • headline prop changed to use named slot headline
  • subline prop changed to use named slot subline
  • icon prop now expects an icon relative or data path
  • Link content is rendered in named slot stageLink

Readme

Properties

PropertyAttributeDescriptionTypeDefault
headlinePriorityheadline-priorityoptional headline priority"h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p"DHL_HEADLINE.TAG.P
iconiconoptional icon value, see dhl-icon component for more details.stringundefined
link--optional call to action configuration - see dhl-link component for detailed prop documentationDhlLink & { ariaLabel: string; }undefined

Slots

SlotDescription
"headline"it must hold text content to be used as headline. Its content is wrapped around a dhl-headline component
"stageLink"it must hold text content to be used as a text for a dhl-link component. Its content is wrapped around a dhl-link component. If the prop link is not set, this slot is not rendered into the component.
"subline"it must hold text content to be used as sub-headline. Its content is wrapped around a dhl-text component

Dependencies

Depends on

Graph


Built by DHL User Interface Library Team!