Skip to content

Component Card

MeowLynxSea edited this page Jun 18, 2026 · 5 revisions

Card

A visual container — title, body, optional footer.

use yororen_ui::headless::card::card;

card("settings", cx)
    .interactive(true)
    .render(cx)
    .child(label("title", "Settings", cx).render(cx))

Props

Method Purpose
interactive(v) Accept focus + click. Use for clickable cards.
has_custom_bg(v) Caller has overridden the background.

The body is added via .child(...) on the returned Stateful<Div>. Pure data — no state entity.

See also: Panel, Form, EmptyState.

Clone this wiki locally