DevactionUI.AuthCard (devaction_ui v0.1.0)

Copy Markdown View Source

The card of a sign-in screen: a header with a soft grid and an amber glow behind an icon tile, a title and a line of text, then the form, and optionally a quieter strip at the bottom for the other way in ("No account? Create one"). One screen is one card, or a card and a note under it.

The icon is the icon slot; icon_class tints its tile (the product mark sits on a dark tile, an envelope or a lock on an amber one). The text is text, or the subtitle slot when part of it is bold, such as an e-mail address.

Summary

Functions

auth_card(assigns)

Attributes

  • title (:string) (required)
  • text (:string) - Defaults to nil.
  • icon_class (:any) - classes for the icon's tile, over the default. Defaults to nil.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • icon - the icon or the mark, drawn by the caller.
  • subtitle - rich text under the title, instead of text.
  • inner_block (required) - the form or the content of the card.
  • footer - the strip under the form.