Skip to main content

card

Function card 

Source
pub fn card<S>() -> El<S>
Expand description

A <div> with a border, a shadow, and token::card behind it.

Put a card_header, a card_content, and a card_footer in it.

use hypersig::Signals;
use hypersig_ui::{Level, card, card_content, card_description, card_header, card_title};
use serde::{Deserialize, Serialize};

#[derive(Signals, Serialize, Deserialize)]
struct App {}

let plan = card::<App>()
    .child(
        card_header()
            .child(card_title(Level::H3).text("Pro"))
            .child(card_description().text("For teams of up to ten.")),
    )
    .child(card_content().text("$20 a month"));
assert!(plan.render().contains("<h3"));