lustre/prefab/text

Text component for lustre_prefab.

Provides predefined text styles for headers, body text, labels, and more.

Values

pub fn body(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Body text element

Example

text.body([], "This is body text")
pub fn font_family() -> @internal Attribute(
  @internal Aligned,
  msg,
)

Default font family for text elements

pub fn form(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Form text element (alias for table)

pub fn grid(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Grid text element (alias for table)

pub fn h1(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Large header text element (h1)

Example

text.h1([], "Welcome")
pub fn h2(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Medium header text element (h2)

pub fn h3(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Small header text element (h3)

pub fn h4(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Very small header text element (h4)

pub fn h5(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Very very small header text element (h5)

pub fn h6(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Very very very small header text element (h6)

pub fn header_small(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Small header text element

pub fn help_text(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Help text element

Example

text.help_text([], "Enter your email address")
pub fn label(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Label text element

Example

text.label([], "Username:")
pub fn section_header(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Section header text element

pub fn table(
  extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
  content: String,
) -> stylish.Element(msg)

Table text element

Search Document