A column on the raised, rounded card surface.
The card is the theme's raised surface: its colour, radius and shadow come from the design, so a card looks right in every one.
Signature
pub const fn card<C>(children: C) -> Container<C>Methods
.elevation(level: fusuma_ui::Elevation) -> Self— How far this lifts off the page (seeelevated)..padding(px: u32) -> Self— Room around the children, in pixels..gap(px: u32) -> Self— Room between the children, in pixels..width(length: Length) -> Self— The width..height(length: Length) -> Self— The height..align(align: CrossAlign) -> Self— How the children line up across the axis..min_size(w: u16, h: u16) -> Self— The least width and height (0 for none)..max_size(w: u16, h: u16) -> Self— The most width and height (0 for none)..margin(px: u8) -> Self— Room around this container, outside its box..justify(justify: fusuma_ui::Justify) -> Self— How the children spread along the axis when there is room left over..padding_sides(left: u8, top: u8, right: u8, bottom: u8) -> Self— Padding on each side instead of the same on all: left, top, right and bottom..margin_auto(left: bool, top: bool, right: bool, bottom: bool) -> Self—automargins on the sides that are true (left, top, right, bottom): along the flow they take the room left over, across it they centre the child or put it at the far edge..rows(rows: Track) -> Self— Rows of a grid that are allrowstall:Track::fixed(px), orTrack::fill(1)to share the height of the grid equally..min_percent(w: u8, h: u8) -> Self— A least width and height that are a percent of the room inside the parent (0 leaves a side as it is): CSSmin-width: 30%..max_percent(w: u8, h: u8) -> Self— A most width and height that are a percent of the room inside the parent (0 leaves a side as it is): CSSmax-width: 80%..min_content() -> Self— This child does not shrink below what its content asks for along the flow of its container (CSSmin-width: auto)..align_content(how: fusuma_ui::Justify) -> Self— Where the lines of a wrapping flow sit when it is taller than they are (CSSalign-content)..snap() -> Self— A scroll area that comes to rest with the top of a child at its top (CSSscroll-snap-type: y mandatory)..dense() -> Self— A grid whose children each take the first place from the top left where they fit (CSSgrid-auto-flow: row dense): a small one fills a hole an earlier row left..sticky_bottom() -> Self— Stays at the bottom of the scroll area it is in (CSSposition: sticky; bottom: 0)..sticky() -> Self— Stays at the top of the scroll area it is in (CSSposition: sticky; top: 0)..reverse() -> Self— The children run from the end (CSSrow-reverse/column-reverse)..width_min_content() -> Self— A paragraph or flow with no width of its own is as narrow as it can be (CSSwidth: min-content): a paragraph is as wide as its longest word..width_max_content() -> Self— A paragraph or flow with no width of its own is as wide as it can be (CSSwidth: max-content): not wrapped..width_fit_content(limit: u16) -> Self— CSSwidth: fit-content(limit): wrapped atlimitpixels or the room it is given, whichever is less..safe() -> Self—CenterandEndacross the flow never go past the start edge when the children do not fit (CSSsafe center)..first_row(first_row: Track) -> Self— A first row of its own in a grid (a header):Track::fixed(px)..row_gap(gap: u32) -> Self— A gap between the lines of a wrap or the rows of a grid that differs from the one between the children in a line..basis(basis: u16) -> Self— The size this container starts from, along its parent's axis, before it takes its share of the room left (when it fills)..row_span(rspan: u8) -> Self— How many rows of a grid this container covers..span(span: u8) -> Self— How many columns of a grid this container covers..pin(corner: fusuma_ui::Pin, x: i16, y: i16) -> Self— Takes this container out of its parent's flow and pins itxacross andydown fromcornerof the parent..shrink(shrink: u8) -> Self— How much this container gives up when its parent's children do not fit (0: nothing)..aspect(w: u16, h: u16) -> Self— A width-to-height ratio: the side without a length of its own follows the other..align_self(align: fusuma_ui::SelfAlign) -> Self— Where this container sits across its parent's axis, if not where the parent puts its children..justify_self(align: fusuma_ui::SelfAlign) -> Self— Where this container sits across its grid cell, if not where the grid puts its children (CSSjustify-self)..justify_items(align: fusuma_ui::SelfAlign) -> Self— Where the children of this grid sit in their cells (CSSjustify-items)..background(surface: Surface) -> Self— A background..round(round: fusuma_ui::Round) -> Self— How round the corners of the background are.
Example
use fusuma::{card, text};
let view = card((text("Steps"), text("8412").title())).padding(1);
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["Steps", "8412"]);