Heading

How to get Heading

import { Heading } from 'fds/components';

Type: Component

Heading creates a visually outstanding text with the primary goal of attracting attention. A Heading is visualized significantly larger than the base text size.

Props

# Name Type Description
1. [align] String

The horizontal alignment of the (textual) content. The possible values are:

  • 'left'

  • 'center'

  • 'right'

  Default value
"left"
2. children ReactNode
3. [colorName] String

The name of the color to use in the component. FDS has implemented a color palette for all of the components implemented in the library.

When building a custom component, try to use the existing colors as much as possible. Try to find an FDS component which is similar to the component you're building. When using colors this way, you can guarantee your component will use the correct color when the style of the library updates.

The possible values can be found in the example.

  Default value
"text-color"
  Related links
4. [icon] String

The name of the icon displayed in the component.

For more information about the available icon names, check the https://fontawesome.com/v4.7.0/icons/

  Default value
null
5. [isBold] Boolean

Whether or not the textual content of the component should be rendered in a bold font weight.

  Default value
false
6. level Number

The level of the heading, a higher level renders a visually smaller heading. The possible values are:

  • '1'

  • '2'

  • '3'

  • '4'

7. [userSelect] String

The CSS value for user-select. The possible values are:

  • 'none',

  • 'text'

Defaults to 'text'.

  Default value
"text"

Related links