Phoenix UI

Phoenix UI home page
  1. Getting Started
  2. Installation: Tailwind CLI

Card

Cards contain content and actions about a single subject.

Examples

Below you can view various demos with example markup.

Basic Card

The alert component comes with three variants: filled, outlined, and standard (default).

Word of the Day

be•nev•o•lent

adjective

well meaning and kindly.
"a benevolent smile"

Outlined Card

The alert component comes with three variants: filled, outlined, and standard (default).

Word of the Day

be•nev•o•lent

adjective

well meaning and kindly.
"a benevolent smile"

Media

The alert component comes with three variants: filled, outlined, and standard (default).

maui hawaii

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

The alert component comes with three variants: filled, outlined, and standard (default).

John Doe  @johndoe

6 hours ago

maui hawaii

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

API

API documentation for the component. Learn about imports and available attributes.

Import

There are multiple ways to import components.


    # PhoenixUI macro which imports all components
    use PhoenixUI
    # Or import component individually
    import PhoenixUI.Components.Card
    

Card Attributes

Below is a list of attributes that can be applied to the component.

Name Type Default Description
HTML attribute any Supports all HTML attributes.
extend_class string Adds additional classes.
paper attributes any :inherit Set the text-align on the component.
phx-{any} binding Supports all Phoenix DOM element bindings.

Card Header Attributes

Below is a list of attributes that can be applied to the component.

Name Type Default Description
HTML attribute any Supports all HTML attributes.
action slot If set, adds action to header.
avatar slot (avatar component) If set, adds avatar to header.
extend_class string Adds additional classes.
phx-{any} binding Supports all Phoenix DOM element bindings.
subtitle slot (typography component) If set, adds subtitle to header.
title slot (typography component) If set, adds title to header.

Card Media Attributes

Below is a list of attributes that can be applied to the component.

Name Type Default Description
HTML attribute any Supports all HTML attributes.
extend_class string Adds additional classes.
paper attributes any :inherit Set the text-align on the component.
phx-{any} binding Supports all Phoenix DOM element bindings.

Card Content Attributes

Below is a list of attributes that can be applied to the component.

Name Type Default Description
HTML attribute any Supports all HTML attributes.
extend_class string Adds additional classes.
paper attributes any :inherit Set the text-align on the component.
phx-{any} binding Supports all Phoenix DOM element bindings.

Card Action Attributes

Below is a list of attributes that can be applied to the component.

Name Type Default Description
HTML attribute any Supports all HTML attributes.
extend_class string Adds additional classes.
paper attributes any :inherit Set the text-align on the component.
phx-{any} binding Supports all Phoenix DOM element bindings.