Skip to main content

Module card

Module card 

Source
Expand description

Groups related content into a bordered card surface.

Compose Card with CardHeader, CardTitle, CardDescription, CardAction, CardContent, and CardFooter slots. Each slot renders its upstream data-slot attribute and a scoped class so callers can target layout from either Rust or CSS without reaching into the control’s markup.

§Examples

use adam_web_ui::components::card::{Card, CardContent, CardHeader, CardTitle};
use dioxus::prelude::*;
fn app() -> Element {
    rsx! {
        Card {
            CardHeader { CardTitle { "Inspector" } }
            CardContent { "Body" }
        }
    }
}

Re-exports§

pub use Card_completions::Component::Card;
pub use CardHeader_completions::Component::CardHeader;
pub use CardTitle_completions::Component::CardTitle;
pub use CardDescription_completions::Component::CardDescription;
pub use CardAction_completions::Component::CardAction;
pub use CardContent_completions::Component::CardContent;
pub use CardFooter_completions::Component::CardFooter;

Structs§

CardActionProps
Properties for the CardAction component.
CardContentProps
Properties for the CardContent component.
CardDescriptionProps
Properties for the CardDescription component.
CardFooterProps
Properties for the CardFooter component.
CardHeaderProps
Properties for the CardHeader component.
CardProps
Properties for the Card component.
CardTitleProps
Properties for the CardTitle component.

Functions§

Card
Renders the card surface, grouping its children inside a bordered, rounded container.
CardAction
Renders the card header’s action slot, placed in the header’s trailing column.
CardContent
Renders the card’s main content region beneath its optional header.
CardDescription
Renders the card’s secondary description text beneath its title.
CardFooter
Renders the card’s footer region beneath its content.
CardHeader
Renders the card’s header region, placing an optional CardAction in its own column.
CardTitle
Renders the card’s title text with the official heading weight and line height.