Heading

Shows the content hierarchy and improves the reading experience.

Heading

To implement Heading component into your project you’ll need to add the import:

import Heading from "@kiwicom/orbit-components/lib/Heading";

After adding import into your project you can use it simply like:

<Heading>Hello World!</Heading>

Props

Table below contains all types of the props available in Heading component.

NameTypeDefaultDescription
asenum"div"The element used for the root node.
childrenReact.NodeThe content of the Heading.
dataTeststringOptional prop for testing purposes.
alignenumlefttext-align of Heading component
dataA11ySectionstringID for a <SkipNavigation> component.
idstringAdds id HTML attribute to an element. Expects a unique ID.
invertedbooleanThe true, the Heading color will be white.
spaceAfterenumAdditional margin-bottom after component. See this docs
typeenum"title1"The size type of 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

astypealign
"h1""display"start
"h2""displaySubtitle"end
"h3""title1"center
"h4""title2"justify
"h5""title3"
"h6""title4"
"div""title5"

Media Queries

To make Heading responsive you can use props mediumMobile, largeMobile, tablet, desktop and largeDesktop, which match the mediaQueries functions and contain the following properties:

NameTypeDefaultDescription
typeenum"title1"The size type of Heading.
spaceAfterenumAdditional margin-bottom after component. See this docs