PureAdmin.Components.Callout (PureAdmin v1.1.0)

Copy Markdown View Source

Callout components for Pure Admin.

When an icon slot is provided, content is wrapped in pa-callout__content div for proper layout alongside the icon.

Summary

Functions

Renders a callout box.

Functions

callout(assigns)

Renders a callout box.

Examples

<.callout variant="info">Important note here.</.callout>

<.callout variant="warning" heading_text="Warning">
  Be careful with this operation.
</.callout>

<.callout variant="info" size="sm">
  <:icon><i class="fa-solid fa-info-circle"></i></:icon>
  This is a compact callout with an icon.
</.callout>

Attributes

  • variant (:string) - Defaults to "info". Must be one of "primary", "secondary", "info", "success", "warning", or "danger".
  • size (:string) - Callout size. Defaults to nil. Must be one of nil, "sm", or "lg".
  • theme_color (:string) - Theme color slot 1-9 (overrides variant). Defaults to nil. Must be one of nil, "1", "2", "3", "4", "5", "6", "7", "8", or "9".
  • heading_text (:string) - Callout heading text (shorthand for :title slot). Defaults to nil.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • icon - Icon element (wraps content in pa-callout__content).
  • title - Optional callout title (overrides heading_text).
  • inner_block (required)