Heading

Heading

import Heading from "@kiwicom/orbit-components/lib/Heading";
<Heading>Hello World!</Heading>

Props

NameTypeDefaultDescription
asenum"div"Defines the HTML element to be rendered. See Accessibility tab.
role"heading"The role attribute of the element. Can only be defined if as="div". If defined, level must be defined. See Accessibility tab.
levelnumberThe level of the Heading. Required if role is defined as "heading". See Accessibility tab.
childrenReact.NodeThe content of the Heading.
dataTeststringOptional prop for testing purposes.
alignenumstarttext-align of the Heading component.
dataA11ySectionstringID for a SkipNavigation component. See Accessibility tab.
idstringAdds id HTML attribute to an element. Expects a unique ID.
invertedbooleanIf true, the Heading color will be white.
spaceAfterenumAdditional margin-bottom after component.
typeenum"title0"The size type of the Heading.
mediumMobileObjectObject for setting up properties for the mediumMobile viewport. See Media queries
largeMobileObjectObject for setting up properties for the largeMobile viewport. See Media queries
tabletObjectObject for setting up properties for the tablet viewport. See Media queries
desktopObjectObject for setting up properties for the desktop viewport. See Media queries
largeDesktopObjectObject for setting up properties for the largeDesktop viewport. See Media queries

enum

astypealignspaceAfter
"h1""display"start"none"
"h2""displaySubtitle"end"smallest"
"h3""title0"center"small"
"h4""title1"justify"normal"
"h5""title2""medium"
"h6""title3""large"
"div""title4""largest"
"title5"
"title6"

Media Queries

NameTypeDefaultDescription
typeenum"title0"The size type of Heading.
spaceAfterenumAdditional margin-bottom after component.