PetalComponents.Typography (petal_components v3.0.1)

View Source

Everything related to text. Headings, paragraphs and links

Summary

Functions

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Usage

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • no_margin (:boolean) - removes margin from paragraph. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Usage

Functions

h1(assigns)

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

h2(assigns)

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

h3(assigns)

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

h4(assigns)

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

h5(assigns)

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • label (:string) - label your heading. Defaults to nil.
  • no_margin (:boolean) - removes margin from headings. Defaults to nil.
  • underline (:boolean) - underlines a heading. Defaults to false.
  • color_class (:any) - adds a color class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

ol(assigns)

Usage:

<.ol>
  <li>Item 1</li>
  <li>Item 2</li>
</.ol>

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

p(assigns)

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • no_margin (:boolean) - removes margin from paragraph. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

prose(assigns)

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

ul(assigns)

Usage:

<.ul>
  <li>Item 1</li>
  <li>Item 2</li>
</.ul>

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block