Class BOBCard
- Namespace
- BlazOrbit.Components.Layout
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBCard : BOBVariantComponentBase<BOBCard, BOBCardVariant>, IVariantComponent<BOBCardVariant>, IVariantComponent, IHasShadow, IHasElevation, IHasBorder, IHasBackgroundColor, IHasColor
- Inheritance
-
objectComponentBaseBOBCard
- 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
BackgroundColor
Background color of the card. Accepts any valid CSS color value.
[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
BuiltInTemplates
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
[Parameter]
public bool Clickable { get; set; }
Property Value
- bool
Color
Text color of the card. Accepts any valid CSS color value.
[Parameter]
public string? Color { get; set; }
Property Value
- string
DefaultVariant
Default variant used when no explicit variant is specified.
public override BOBCardVariant DefaultVariant { get; }
Property Value
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
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
Methods
BuildComponentCssVariables(Dictionary<string, string>)
Override this method in derived components to add custom CSS variables. These will be merged with the standard behavior CSS variables. This method is called from BOBComponentAttributesBuilder during the style building process.
public override void BuildComponentCssVariables(Dictionary<string, string> cssVariables)
Parameters
cssVariablesDictionary<string, string>Dictionary to add CSS variables to
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder