Beacon.LiveAdmin.StationUI.HTML.Toast (Beacon LiveAdmin v0.4.0)

View Source

Summary

Functions

A toast message component. The primary (left) paragraph content goes into the main inner_block slot. The optional secondary (right) content goes into the secondary slot.

Functions

toast(assigns)

A toast message component. The primary (left) paragraph content goes into the main inner_block slot. The optional secondary (right) content goes into the secondary slot.

Examples

Toast with left icon and right button:

<.toast>

<.icon name="hero-information-circle-solid" class="size-7 text-rose-700" />
This is the toast content
<:secondary>
  <.button class="sui-primary">
    Button
  </.button>
</:secondary>

</.toast>

Toast without border:

<.toast class="text-lg border-transparent">

...

</.toast>

Suggested classes for various text sizes and the default border styling:

  • xs -> "text-sm border-[--sui-brand-primary-border]"
  • sm -> "text-base border-[--sui-brand-primary-border]"
  • md -> "text-lg border-[--sui-brand-primary-border]" (default)
  • lg -> "text-2xl border-[--sui-brand-primary-border]"
  • xl -> "text-3xl border-[--sui-brand-primary-border]"

Attributes

  • class (:any) - Defaults to "text-lg border-[--sui-brand-primary-border]".

Slots

  • inner_block (required)
  • secondary