Skip to main content

GlobalIllustratedValidation

The GlobalIllustratedValidation is used to compose validation message views. Additional views can be added below the subHeadline as children.

Import

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

Code

<DhlIllustratedValidation 
headlineText="Thank you!"
headlineTag="h1"
subHeadlineText="Your message was sent successfully"
subHeadlineTag="h2"
alt="An envelope with confetti"
message="lorem ipsum"
src="">
<DhlButton>
Action
</DhlButton>
</DhlIllustratedValidation>

Interactive Demo

Readme

Properties

PropertyAttributeDescriptionTypeDefault
alt (required)altA REQUIRED prop used to specify the alt text within the component.stringundefined
dataClassNamedata-class-nameAn optional prop for the class of the root element.stringundefined
dataIddata-idAn optional prop. Gives a valid HTML ID attribute value for the component.stringdhl-illustrated-validation-${getRandomString()}
dataTestiddata-testidAn optional prop. The test id attached to the component as a data-testid attribute.stringundefined
headlineTagheadline-tagThis is an optional prop. Defines which headline tag to use. (h1-h6) defaults to H1. For a special case in which the element should not appear semantically as a headline; but should still get rendered in the same layout; it can additionally be rendered as a <p> tag."h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p"DHL_ILLUSTRATED_VALIDATION.HEADLINE_TAG.H1
headlineTextheadline-textAn optional prop used to set the headline textstringundefined
messagemessageAn optional prop used to set the validation messagestringundefined
srcsrcAn optional prop used to specify the image source.stringundefined
subHeadlineTagsub-headline-tagAn optional prop used to set the heading tag of the subHeadline."h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p"DHL_ILLUSTRATED_VALIDATION.SUBHEADLINE_TAG.H2
subHeadlineTextsub-headline-textAn optional prop used to set the subHeadline textstringundefined

Slots

SlotDescription
"unnamed"unnamed children slot for DhlIllustratedValidation content inc. a call to action

Dependencies

Depends on

Graph


Built by DHL User Interface Library Team!