PhoenixDuskmoon.Component.Card (PhoenixDuskmoon v6.1.3)

View Source

Duskmoon UI Card Component

Summary

Functions

Renders a card with async value.

Generates card

Functions

dm_async_card(assigns)

Renders a card with async value.

Examples

<.dm_async_card :let={data} assign={@data}>
</.dm_async_card>

Attributes

  • id (:any) - Defaults to nil.
  • class (:any) - Defaults to "".
  • body_class (:any) - Defaults to "".
  • skeleton_class (:any) - Defaults to "".
  • assign (:any) - Defaults to nil.

Slots

  • inner_block (required)
  • title - Render a card title. Accepts attributes:
    • id (:any) - title id.
    • class (:any) - title class.
  • action - Render a card action. Accepts attributes:
    • id (:any) - action id.
    • class (:any) - action class.

dm_card(assigns)

Generates card

Example

<.dm_card>
  <:title>
  Star Wars
  </:title>
  Star Wars is an American epic space opera multimedia
  franchise created by George Lucas,
  which began with the eponymous 1977 film and
  quickly became a worldwide pop-culture phenomenon.
</.dm_card>

Attributes

  • id (:any) - html attribute id. Defaults to false.
  • class (:any) - html attribute class. Defaults to "".
  • body_class (:any) - card body attribute class. Defaults to "".

Slots

  • title - Render a card title. Accepts attributes:
    • id (:any) - title id.
    • class (:any) - title class.
  • action - Render a card action. Accepts attributes:
    • id (:any) - action id.
    • class (:any) - action class.