Card

Displays a card with header, content, and footer.

Installation

The CLI is not yet available. For now, manually copy the component source into your project.

rust-shadcn-ui add card

Usage

use yew::prelude::*;

use crate::components::ui::card::{
    Card,
    CardContent,
    CardDescription,
    CardFooter,
    CardHeader,
    CardTitle,
};

#[component]
fn Usage() -> impl IntoView {
    view! {
        <Card>
            <CardHeader>
                <CardTitle>{"Card Title"}</CardTitle>
                <CardDescription>{"Card Description"}</CardDescription>
            </CardHeader>
            <CardContent>
                <p>{"Card Content"}</p>
            </CardContent>
            <CardFooter>
                <p>{"Card Footer"}</p>
            </CardFooter>
        </Card>
    }
}

Examples

See Also