EssenceUI.Components.Heading (Essence UI v0.2.0)

Copy Markdown View Source

Themed heading with size and weight options.

Summary

Functions

Renders a heading.

Functions

heading(assigns)

Renders a heading.

Attributes

  • as (:string) - The element to render. h1-h6. Defaults to "h1". Must be one of "h1", "h2", "h3", "h4", "h5", or "h6".
  • size (:string) - Heading size (1-9). Responsive supported. Must be one of "1", "2", "3", "4", "5", "6", "7", "8", or "9".
  • weight (:string) - Font weight: one of light, regular, medium, bold. Must be one of "light", "regular", "medium", or "bold".
  • align (:string) - Text alignment: one of left, center, right. Must be one of "left", "center", or "right".
  • trim (:string) - Trim leading space: one of normal, start, end, both. Must be one of "normal", "start", "end", or "both".
  • truncate (:boolean) - Whether to truncate text with ellipsis when it overflows.
  • wrap (:string) - Text wrapping: one of wrap, nowrap, pretty, balance. Must be one of "wrap", "nowrap", "pretty", or "balance".
  • color (:string) - Color utility class string. One of: gray, gold, bronze, brown, yellow, amber, orange, tomato, red, ruby, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, teal, jade, green, grass, lime, mint, sky. Must be one of "gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", or "sky".
  • m (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mx (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • my (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mt (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mr (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • mb (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • ml (:any) - Margin utility class string or map. Example: 1 or %{xs: '1', sm: '2'}.
  • high_contrast (:boolean) - Whether to increase color contrast with the background.
  • class (:string) - Additional CSS classes. Defaults to nil.
  • style (:string) - Additional inline styles. Defaults to nil.
  • rest (:any) - Additional HTML attributes. Defaults to %{}.

Slots

  • inner_block (required)