ZoonkWeb.Components.Loader (Zoonk v0.1.0-dev)

View Source

Loader components.

Minimalist pulsing dot loader component for subtle loading states.

Summary

Functions

Renders a full-page loader with customizable title and description.

Renders a pulsing dot loader.

Functions

full_page_loader(assigns)

Renders a full-page loader with customizable title and description.

This component combines the loader with contextual text to inform users about the loading process. Use it for processes that require a full-page loading indicator with explanatory text.

Examples

<.full_page_loader
  title="Loading your data"
  subtitle="Please wait while we prepare your information."
/>

Attributes

  • id (:string) - ID of the loader container. Defaults to "loader_-576460752303405372".
  • class (:any) - Additional CSS classes for the container. Defaults to nil.
  • title (:string) (required) - Main message displayed below the loader.
  • subtitle (:string) - Secondary text explaining the loading process. Defaults to nil.
  • feature (:string) - Text highlighted in primary color (optional). Defaults to nil.
  • delay_loading (:boolean) - Delay loading loader to avoid flicker on fast operations. Defaults to false.
  • Global attributes are accepted. Additional HTML attributes.

loader(assigns)

Renders a pulsing dot loader.

Examples

<.loader />
<.loader size={:md} />
<.loader variant={:sky} />

Attributes

  • class (:string) - Additional CSS classes for the loader. Defaults to nil.
  • size (:atom) - Size of the loader. Defaults to :sm. Must be one of :xs, :sm, :md, :lg, or :xl.
  • Global attributes are accepted. Additional HTML attributes.