DevactionUI.Spinner (devaction_ui v0.2.3)

Copy Markdown View Source

A spinning ring for work in progress, one turn in 0.8 s. The label is read by screen readers and never drawn. size is :md (22 px, the canvas's) or :sm (16 px, for inside a button); tone colors the moving arc (ink by default).

dots/1 is the other indicator of the canvas: three dots of 7 px that pulse one after the other, for a line of text that is being written (the AI answering). It stands still under prefers-reduced-motion.

Summary

Functions

Three dots that pulse one after the other.

Functions

dots(assigns)

@spec dots(map()) :: Phoenix.LiveView.Rendered.t()

Three dots that pulse one after the other.

Attributes

  • label (:string) (required) - what is happening, for assistive technology.
  • tone (:atom) - Defaults to :neutral. Must be one of :neutral, :warn, :ok, :risk, or :info.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

spinner(assigns)

Attributes

  • label (:string) (required) - what is happening, for assistive technology.
  • size (:atom) - Defaults to :md. Must be one of :sm, or :md.
  • tone (:atom) - Defaults to :neutral. Must be one of :neutral, :warn, :ok, :risk, or :info.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.