Module cards

Module cards 

Source
Expand description

Bootstrap card components.

Provides type-safe Bootstrap cards matching the Bootstrap cards documentation.

§Example

use ironhtml_bootstrap::cards::*;

// Simple card
let simple = card(|c| c.text("Card content"));
assert!(simple.render().contains(r#"class="card"#));

// Card with title and text (from Bootstrap docs)
let doc_card = card_simple("Card title", "Some text", "Go", "#");
assert!(doc_card.render().contains("card-title"));
assert!(doc_card.render().contains("card-text"));

Functions§

card
Create a basic Bootstrap card.
card_border
Create a card with border color.
card_colored
Create a colored card (text-bg-{color}).
card_simple
Create a card with title and text (from Bootstrap docs example).
card_width
Create a card with specific width.
card_with_header_footer
Create a card with header and footer.
card_with_image
Create a card with image on top (from Bootstrap docs).