Card
Description
A card component with optional headers and footers
Cards are surfaces that display content and actions on a single topic.
They should be easy to scan for relevant and actionable information. Elements, like text and images, should be placed on them in a way that clearly indicates hierarchy.
Cards can contain different types of components. They can be used to show a list of items, a single item, or a mix of both.
API reference
public sealed class Card : ComponentBase<Card, HTMLElement>, IHasBackgroundColor, IRoundedStyleA bordered, shadowed surface used to group related content into a self-contained block.
Constructors
Properties
public bool IsCompact { get ; set ; }Gets or set whenever the card is rendered in a compact form
Methods
private void EnsureLayout()Gets or set whenever the card is rendered in a compact form
public override Card OnClick(ComponentEventHandler<Card, MouseEvent> onClick, bool clearPrevious = true)Registers a callback invoked when the click event fires.
public Card OnClick(Action action)Registers a callback invoked when the click event fires.
public Card BackgroundColor(string color)Sets the background colour of the card.
public Card Border(string color, UnitSize size = null)Configures the component to border.
public Card HoverColor(bool enabled = true)Enables or disables the hover colour overlay on the card.