h1-h6

The h1 to h6 HTML elements represent six levels of headings, from most important to least important.

  • XML elements: h1, h2, h3, h4, h5, h6

  • Java classes: H1, H2, H3, H4, H5, H6

Basics

Use headings to convey logical hierarchy of the content. Indicating important sections with headings makes it easier for users to find relevant content.

<h1 text="Clouds"/>
<h2 text="Classification"/>
<h3 text="Physical forms"/>
<h4 text="Cumulus"/>
<h4 text="Stratus"/>
<h4 text="Cirrus"/>
<h3 text="Levels"/>
<h4 text="High"/>
<h4 text="Mid"/>
<h4 text="Low"/>
h1h6 basic

Attributes

themeNames

Adds a theme to the component. Possible values are:

  • normal

  • success

  • error

  • contrast

  • primary

  • small

  • pill

whiteSpace

MDN

Defines the component’s white-space style value. Possible values are:

  • NORMAL

  • NOWRAP

  • PRE

  • PRE_WRAP

  • PRE_LINE

  • BREAK_SPACES

  • INHERIT

  • INITIAL

Handlers

To generate a handler stub in Jmix Studio, use the Handlers tab of the Jmix UI inspector panel or the Generate Handler action available in the top panel of the view class and through the CodeGenerate menu (Alt+Insert / Cmd+N).

ClickEvent

com.vaadin.flow.component.ClickEvent is sent when the user clicks on the heading.