Component

BOBDataCards

The same column-driven data pipeline as DataGrid, rendered as a responsive card grid — sorting, filtering, pagination, selection, custom templates.

API reference ↗

Basic usage

Declare BOBDataColumn entries for the fields to surface. Cards lay out automatically via MinCardWidth.

6 rows.
Name Aurora Lamp
Category Lighting
Price $89.00
Stock 12
Name Basalt Desk
Category Furniture
Price $349.00
Stock 4
Name Cobalt Chair
Category Furniture
Price $199.00
Stock 0
Name Drift Speaker
Category Audio
Price $129.00
Stock 27
Name Ember Kettle
Category Kitchen
Price $59.00
Stock 8
Name Fjord Mug
Category Kitchen
Price $18.00
Stock 60
RAZOR
<BOBDataCards TItem="Product" Items="_products" MinCardWidth="240px">
    <Columns>
        <BOBDataColumn TItem="Product" Header="Name" Property="@(p => p.Name)" />
        <BOBDataColumn TItem="Product" Header="Category" Property="@(p => p.Category)" />
        <BOBDataColumn TItem="Product" Header="Price" Property="@(p => p.Price)" Format="C" />
        <BOBDataColumn TItem="Product" Header="Stock" Property="@(p => p.Stock)" />
    </Columns>
</BOBDataCards>

Custom card template

Provide a CardTemplate to completely own the card layout per item.

6 rows.

Aurora Lamp

Lighting
$89.00
12 in stock

Basalt Desk

Furniture
$349.00
4 in stock

Cobalt Chair

Furniture
$199.00
Out of stock

Drift Speaker

Audio
$129.00
27 in stock

Ember Kettle

Kitchen
$59.00
8 in stock

Fjord Mug

Kitchen
$18.00
60 in stock
RAZOR
<BOBDataCards TItem="Product" Items="_products" MinCardWidth="220px">
    <Columns>
        <BOBDataColumn TItem="Product" Header="Name" Property="@(p => p.Name)" />
    </Columns>
    <CardTemplate Context="p">
        <div style="padding: 1rem;">
            <h4 style="margin: 0 0 .25rem 0;">@p.Name</h4>
            <span style="opacity:.7;">@p.Category</span>
            <div style="margin-top: .75rem; font-weight: 600;">@p.Price.ToString("C")</div>
            <div style="margin-top: .25rem; font-size: .85em; color: var(--palette-@(p.Stock == 0 ? "error" : "success"));">
                @(p.Stock == 0 ? Loc["Out of stock"].Value : $"{p.Stock} {Loc["in stock"]}")
            </div>
        </div>
    </CardTemplate>
</BOBDataCards>

Filtering & sorting

Enable Filterable and Sortable to get a toolbar with search and sort controls.

6 rows. Page 1 of 2.
Name Aurora Lamp
Category Lighting
Price $89.00
Name Basalt Desk
Category Furniture
Price $349.00
Name Cobalt Chair
Category Furniture
Price $199.00
Name Drift Speaker
Category Audio
Price $129.00
Showing 1 to 4 of 6
RAZOR
<BOBDataCards TItem="Product" Items="_products" Filterable="true" Sortable="true" PageSize="4" MinCardWidth="220px">
    <Columns>
        <BOBDataColumn TItem="Product" Header="Name" Property="@(p => p.Name)" Sortable="true" />
        <BOBDataColumn TItem="Product" Header="Category" Property="@(p => p.Category)" Sortable="true" />
        <BOBDataColumn TItem="Product" Header="Price" Property="@(p => p.Price)" Sortable="true" Format="C" />
    </Columns>
</BOBDataCards>

Selection

SelectionMode.Multiple adds a checkbox per card and exposes the set via @bind-SelectedItems.

6 rows.
Name Aurora Lamp
Price $89.00
Name Basalt Desk
Price $349.00
Name Cobalt Chair
Price $199.00
Name Drift Speaker
Price $129.00
Name Ember Kettle
Price $59.00
Name Fjord Mug
Price $18.00
RAZOR
<BOBDataCards TItem="Product"
              Items="_products"
              SelectionMode="SelectionMode.Multiple"
              @bind-SelectedItems="_selected"
              MinCardWidth="220px">
    <Columns>
        <BOBDataColumn TItem="Product" Header="Name" Property="@(p => p.Name)" />
        <BOBDataColumn TItem="Product" Header="Price" Property="@(p => p.Price)" Format="C" />
    </Columns>
</BOBDataCards>

Card styling

Use CardBorder, CardShadow, and CardBackground for quick tweaks without CSS.

6 rows.
Name Aurora Lamp
Category Lighting
Price $89.00
Name Basalt Desk
Category Furniture
Price $349.00
Name Cobalt Chair
Category Furniture
Price $199.00
Name Drift Speaker
Category Audio
Price $129.00
Name Ember Kettle
Category Kitchen
Price $59.00
Name Fjord Mug
Category Kitchen
Price $18.00
RAZOR
<BOBDataCards TItem="Product" Items="_products"
              CardBorder="@BOBBorderPresets.RoundedLarge"
              CardShadow="@BOBShadowPresets.Elevation(2)"
              MinCardWidth="220px">
    <Columns>
        <BOBDataColumn TItem="Product" Header="Name" Property="@(p => p.Name)" />
        <BOBDataColumn TItem="Product" Header="Category" Property="@(p => p.Category)" />
        <BOBDataColumn TItem="Product" Header="Price" Property="@(p => p.Price)" Format="C" />
    </Columns>
</BOBDataCards>

Properties

41 rows.
PropertyTypeDefaultDescription
ColumnsCountint3ColumnsCount.
Gapstring"1rem"Gap.
MinCardWidthstring?"280px"MinCardWidth.
CardTemplateRenderFragment<TItem>?Custom template for rendering the Card.
CardHeaderTemplateRenderFragment<TItem>?Custom template for rendering the CardHeader.
CardFooterTemplateRenderFragment<TItem>?Custom template for rendering the CardFooter.
CardBorderBorderStyle?CardBorder.
CardShadowShadowStyle?CardShadow.
CardBackgroundstring?CardBackground.
ColumnsRenderFragment?Column definitions rendered inside the data collection.
ItemsIEnumerable<TItem>?Data items to display.
DensityBOBDensityBOBDensity.StandardVertical density (gap) of rows.
SizeBOBSizeBOBSize.MediumVisual size of the data collection.
HoverableBooleantrueWhen true (default), rows highlight on hover.
ShadowShadowStyle?Shadow style applied to the container.
SelectionModeSelectionModeSelectionMode.NoneRow selection mode.
SelectedItemsHashSet<TItem>?Currently selected items. Use with two-way binding.
SelectedItemsChangedEventCallback<HashSet<TItem>>Raised when the selection changes.
SortableBooleanWhen true, column headers are clickable for sorting.
DefaultSortColumnString?Name of the column to sort by on initial render.
DefaultSortDirectionSortDirection?Initial sort direction. Defaults to Ascending.
FilterableBooleanWhen true, a search box filters the displayed items.
FilterPlaceholderString"Search..."Placeholder text for the filter search box.
CustomFilterFunc<TItem, String, Boolean>?Custom predicate used to filter items. Receives the item and the search text.
PageSizeInt32?Number of items per page. When null, pagination is disabled.
PageSizeOptionsInt32[][10, 20, 50, 100]Available page sizes shown in the page-size selector.
ShowPageSizeSelectorBooleanWhen true, a dropdown lets the user change the page size.
EnableVirtualizationBooleanWhen true, only visible rows are rendered (improves performance for large lists).
HeightString?Fixed height of the container. Required for virtualization and fixed header.
EmptyContentRenderFragment?Custom template rendered when there are no items to display.
LoadingContentRenderFragment?Custom template rendered while Loading is true.
LoadingBooleanWhen true, the loading template is shown.
BorderBorderStyle?Border style applied to the container.
BackgroundColorString?Background color of the container. Accepts any valid CSS color value.
ItemPatternRowStylePattern?Alternating row style pattern (e.g. zebra striping).
OnRowClickEventCallback<TItem>Raised when a row is clicked and SelectionMode is not active.
OnSortEventCallback<DataCollectionSortEventArgs>Raised when the sort column or direction changes.
OnFilterEventCallback<DataCollectionFilterEventArgs>Raised when the filter text changes.
OnPageChangeEventCallback<DataCollectionPageChangeEventArgs>Raised when the current page changes.
VariantTVariant?
AdditionalAttributesIReadOnlyDictionary<String, Object>?