com.vaadin.flow.component.html.

Class H2

All Implemented Interfaces:

AttachNotifier, ClickNotifier<H2>, DetachNotifier, HasComponents, HasElement, HasEnabled, HasSize, HasStyle, HasText, Serializable

@Tag("h2") public class H2 extends HtmlContainer implements ClickNotifier<H2>

Component representing a <h2> element.

Since:

1.0

Author:

Vaadin Ltd

See Also:

  • Constructor Details

    • H2

      public H2()

      Creates a new empty heading.

    • H2

      public H2(Component... components)

      Creates a new heading with the given child components.

      Parameters:

      components - the child components

    • H2

      public H2(String text)

      Creates a new heading with the given text.

      Parameters:

      text - the text