Skip to main content

Loader

The Loader provides visual feedback to the user that an action is underway, or complete.

Import

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

Code​

<DhlLoader></DhlLoader>

Interactive Demo​

Readme​

Properties​

PropertyAttributeDescriptionTypeDefault
currentStepcurrent-stepAn optional prop to set the number of completed steps for the DHL_LOADER.TYPE.RING_STEPS variantnumberundefined
dataAriaLabeldata-aria-labelAn optional prop for screen reader text to describe the loading statestring"Loading"
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.string`duil311-dhl-loader-${getRandomString()}`
dataTestiddata-testidAn optional prop. The test id attached to the component as a data-testid attribute.stringundefined
percentagepercentageAn optional prop to set loading percentage for DHL_LOADER.TYPE.RING_PERCENTAGE variantnumberundefined
showPercentageshow-percentageAn optional prop to display loading percentagebooleantrue
sizesizeAn optional size prop for the component."lg" | "md" | "sm" | "xl" | "xs"DHL_LOADER.SIZE.LG
totalStepstotal-stepsAn optional prop to set the total number of steps for the DHL_LOADER.TYPE.RING_STEPS variantnumberundefined
typetypeAn optional prop defining the size variant of the Loader"ring" | "ring-done" | "ring-dual" | "ring-percentage" | "ring-steps"DHL_LOADER.TYPE.RING
variantvariantAn optional prop to select a component design variant."neutral" | "on-filled" | "on-surface" | "primary" | "success"DHL_LOADER.VARIANT.PRIMARY

Dependencies​

Used by​

Depends on​

Graph​


Built by DHL User Interface Library Team!