PhiaUi.Components.FeatureCard (phia_ui v0.1.17)

Copy Markdown View Source

Icon + title + description — the standard landing page feature block.

Summary

Functions

Renders a feature card with an icon, title, description, and optional extra content.

Functions

feature_card(assigns)

Renders a feature card with an icon, title, description, and optional extra content.

Variants

  • :default — card with border and shadow
  • :bordered — stronger border-2, no shadow
  • :ghost — no border, no shadow (plain div wrapper)

Icon positions

  • :top — icon stacked above the title (flex-col)
  • :left — icon to the left of title + description (flex-row)

Examples

<.feature_card title="Fast" description="Blazing fast performance">
  <:icon><.icon name="zap" /></:icon>
</.feature_card>

<.feature_card title="Secure" variant={:bordered} icon_position={:left}>
  <:icon><.icon name="shield" /></:icon>
</.feature_card>

Attributes

  • title (:string) (required) - Feature title.
  • description (:string) - Optional supporting description. Defaults to nil.
  • variant (:atom) - Visual style variant. Defaults to :default. Must be one of :default, :bordered, or :ghost.
  • icon_position (:atom) - Position of the icon relative to text. Defaults to :top. Must be one of :top, or :left.
  • class (:string) - Additional CSS classes. Defaults to nil.
  • Global attributes are accepted. HTML attributes forwarded to the wrapper element.

Slots

  • icon - Optional icon content.
  • inner_block - Optional extra content below description.