Skip to main content

StatusBadge

The StatusBadge component is for showing a small amount of color-categorized metadata. It's ideal for getting a user's attention.

Import

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

Code

<DhlStatusBadge />

Interactive Demo

Example

<DhlStatusBadge variant="pill" status="info" label="Status" showDropdownIcon></DhlStatusBadge>

Readme

Properties

PropertyAttributeDescriptionTypeDefault
clickEvent--An optional clickEvent callback handler.(e: any) => voidundefined
dataAriaLabeldata-aria-labelAn optional prop defining the text read by the screen reader to represent the component; use this if you need different text to be read from label.stringundefined
dataRoledata-roleAn optional prop defining the role attribute of the component.string"status"
iconiconAn optional prop to set component icon.stringundefined
isDropdownOpenis-dropdown-openAn optional boolean to toggle dropdown icon. Will be visible only for "pill" variant.booleanfalse
labellabelAn optional prop to set component label.stringundefined
showDropdownIconshow-dropdown-iconAn optional boolean prop to show dropdown icon.booleantrue
sizesizeAn optional size prop for the component.Sizes.MD \| Sizes.SMDHL_STATUS_BADGE.SIZE.MD
statusstatusAn optional prop to select a component status.Variants.error \| Variants.info \| Variants.neutral \| Variants.success \| Variants.warningDHL_STATUS_BADGE.STATUS.NEUTRAL
variantvariantAn optional prop to select a component variant."count" \| "dot" \| "icon" \| "pill"DHL_STATUS_BADGE.VARIANT.PILL

Dependencies

Depends on

Graph


Built by DHL User Interface Library Team!