Table of Contents

Class BOBCard

Namespace
BlazOrbit.Components
Assembly
BlazOrbit.dll
[GenerateComponentInfo]
public class BOBCard : BOBVariantComponentBase<BOBCard, BOBCardVariant>, IVariantComponent<BOBCardVariant>, IVariantComponent, IPureBuiltComponent, IBuiltComponent, IHasShadow, IHasElevation, IHasBorder, IHasBackgroundColor, IHasColor
Inheritance
object
ComponentBase
BOBCard
Implements
Inherited Members

Constructors

BOBCard()

public BOBCard()

Properties

Actions

Action row rendered at the bottom of the card (typically buttons).

[Parameter]
public RenderFragment? Actions { get; set; }

Property Value

RenderFragment

ActionsAlignment

Horizontal alignment of the action row.

[Parameter]
public CardActionsAlignment ActionsAlignment { get; set; }

Property Value

CardActionsAlignment

BackgroundColor

Background color of the card. Accepts any valid CSS color value, PaletteColor or BOBColor.

[Parameter]
public string? BackgroundColor { get; set; }

Property Value

string

Border

Border style applied to the card edge.

[Parameter]
public BorderStyle? Border { get; set; }

Property Value

BorderStyle

BuiltInTemplates

Compile-time map of variants to their built-in render templates.

protected override Dictionary<BOBCardVariant, Func<BOBCard, RenderFragment>> BuiltInTemplates { get; }

Property Value

Dictionary<BOBCardVariant, Func<BOBCard, RenderFragment>>

ChildContent

Content rendered inside the component.

[Parameter]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Clickable

When true, the whole card surfaces a hover/active state and forwards clicks to OnClick.

[Parameter]
public bool Clickable { get; set; }

Property Value

bool

Color

Text color of the card. Accepts any valid CSS color value, PaletteColor or BOBColor.

[Parameter]
public string? Color { get; set; }

Property Value

string

DefaultVariant

Variant used when no Variant is supplied.

public override BOBCardVariant DefaultVariant { get; }

Property Value

BOBCardVariant

Elevation

Material Design elevation level (0–24). Sets a derived shadow and lifts the surface in dark mode via a tint overlay. Overridden by Shadow when both are set.

[Parameter]
public int? Elevation { get; set; }

Property Value

int?

Header

Header content rendered above the card body (typically a title row).

[Parameter]
public RenderFragment? Header { get; set; }

Property Value

RenderFragment

Media

Media slot rendered as a banner above or below the body, controlled by MediaPosition.

[Parameter]
public RenderFragment? Media { get; set; }

Property Value

RenderFragment

MediaHeight

CSS height applied to the media slot (any valid CSS length, e.g. "160px").

[Parameter]
public string? MediaHeight { get; set; }

Property Value

string

MediaPosition

Whether the media slot renders above or below the card body.

[Parameter]
public CardMediaPosition MediaPosition { get; set; }

Property Value

CardMediaPosition

OnClick

Raised when the component is clicked.

[Parameter]
public EventCallback<MouseEventArgs> OnClick { get; set; }

Property Value

EventCallback<MouseEventArgs>

Shadow

Shadow style applied to the card surface. Wins over Elevation when both are set.

[Parameter]
public ShadowStyle? Shadow { get; set; }

Property Value

ShadowStyle

Methods

BuildComponentCssVariables(Dictionary<string, string>)

Contributes additional CSS custom properties to the inline style attribute. Keys that collide with framework-owned --bob-inline-* variables will be overwritten.

public void BuildComponentCssVariables(Dictionary<string, string> cssVariables)

Parameters

cssVariables Dictionary<string, string>

BuildComponentDataAttributes(Dictionary<string, object>)

Contributes additional data- attributes to the root element. Keys that collide with framework-owned data-bob- attributes will be overwritten.

public void BuildComponentDataAttributes(Dictionary<string, object> dataAttributes)

Parameters

dataAttributes Dictionary<string, object>

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder