BlazzyMotion.Bento 1.0.2

dotnet add package BlazzyMotion.Bento --version 1.0.2
                    
NuGet\Install-Package BlazzyMotion.Bento -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlazzyMotion.Bento" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazzyMotion.Bento" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="BlazzyMotion.Bento" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlazzyMotion.Bento --version 1.0.2
                    
#r "nuget: BlazzyMotion.Bento, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlazzyMotion.Bento@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlazzyMotion.Bento&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=BlazzyMotion.Bento&version=1.0.2
                    
Install as a Cake Tool

BlazzyMotion.Bento

A modern Bento Grid component for Blazor with Composition Mode for building rich dashboard layouts. Combine metrics, features, cards, quotes, and embed other components like BzCarousel.

NuGet NuGet Downloads License: MIT Quality Gate Status Coverage Reliability Rating

Table of Contents

Features

  • Composition Mode - Build complex layouts with metrics, features, cards, and quotes
  • Embed Any Component - Nest BzCarousel, charts, or any Blazor component inside grid cells
  • 5 Built-in Components - BzBentoItem, BzBentoCard, BzBentoMetric, BzBentoFeature, BzBentoQuote
  • Flexible Grid Spanning - ColSpan and RowSpan (1-4) for each item
  • Staggered Animations - Intersection Observer-powered entrance animations
  • Multiple Themes - Glass, Dark, Light, and Minimal themes
  • CSS Grid Powered - Native CSS Grid with grid-auto-flow: dense for gap-free layouts
  • Responsive Design - Automatic column reduction on tablet and mobile
  • Items Mode - Simple image gallery with zero configuration (for basic use cases)

Live Demo

Experience BlazzyMotion.Bento in action: View Live Demo

BlazzyMotion.Bento Demo

Perfect For

  • SaaS Dashboards - Display metrics, KPIs, and status indicators
  • Landing Pages - Apple-style feature showcases with mixed content
  • Admin Panels - Combine charts, stats, and data tables in one view
  • Portfolio Sites - Showcase projects with varying sizes and emphasis
  • Product Pages - Mix product images, reviews, and specifications

Quick Start

Installation

dotnet add package BlazzyMotion.Bento

Or via Package Manager Console:

Install-Package BlazzyMotion.Bento

Basic Composition Mode

The primary way to use BzBento is Composition Mode - building layouts with built-in components:

@using BlazzyMotion.Bento.Components
@using BlazzyMotion.Core.Models

<BzBento TItem="object" Theme="BzTheme.Glass" Columns="4">

    <BzBentoCard ColSpan="2" RowSpan="2"
                 Image="images/hero.jpg"
                 Title="Featured Product"
                 Description="Our flagship offering" />

    <BzBentoMetric Value="12,847" Label="Active Users" Trend="+23%" />
    <BzBentoMetric Value="99.9%" Label="Uptime" />

    <BzBentoFeature ColSpan="2"
                    IconText="⚡"
                    Label="Lightning Fast"
                    Description="Built for performance" />

    <BzBentoQuote Text="This component saved us weeks of development!"
                  Author="Jane Doe"
                  Role="Tech Lead" />

</BzBento>

Composition Mode

Composition Mode is the recommended approach for BzBento. It gives you complete control over the layout by combining built-in components.

Dashboard Example

Build interactive dashboards by combining metrics, features, and embedded components:

<BzBento TItem="object" Theme="BzTheme.Glass" Columns="4">

    
    <BzBentoItem ColSpan="2" RowSpan="2">
        <BzCarousel TItem="Company"
                    Items="companies"
                    OnItemSelected="OnCompanyChanged" />
    </BzBentoItem>

    
    <BzBentoMetric Value="@company?.Revenue" Label="Revenue" Trend="+23%" />
    <BzBentoMetric Value="@company?.Users" Label="Users" Trend="+12%" />
    <BzBentoMetric Value="99.9%" Label="Uptime" />
    <BzBentoMetric Value="24ms" Label="Response Time" />

    
    <BzBentoFeature ColSpan="2"
                    IconText="📊"
                    Label="Q4 Report Ready"
                    Description="Revenue exceeded targets by 15%" />

    
    <BzBentoQuote ColSpan="2"
                  Text="The best Blazor component library we've used."
                  Author="John Smith"
                  Role="CTO at TechCorp" />

</BzBento>

@code {
    private List<Company> companies = new();
    private Company? company;

    private void OnCompanyChanged(Company c) => company = c;
}

Embedding Components

Use BzBentoItem to embed any Blazor component inside the grid:

<BzBento TItem="object" Columns="3">

    
    <BzBentoItem ColSpan="2" RowSpan="2">
        <BzCarousel TItem="Product" Items="products" />
    </BzBentoItem>

    
    <BzBentoItem ColSpan="1" RowSpan="2">
        <MyChartComponent Data="chartData" />
    </BzBentoItem>

    
    <BzBentoItem ColSpan="3">
        <div class="custom-footer">
            <p>Custom HTML content goes here</p>
        </div>
    </BzBentoItem>

</BzBento>

Built-in Components

All components support ColSpan (1-4), RowSpan (1-4), and OnClick for grid spanning and interaction.

BzBentoItem

Base container for embedding any content:

<BzBentoItem ColSpan="2" RowSpan="2">
    <BzCarousel TItem="Product" Items="products" />
</BzBentoItem>

BzBentoCard

Image card with overlay text:

<BzBentoCard ColSpan="2" RowSpan="2"
             Image="images/hero.jpg"
             Title="Featured"
             Description="Our flagship product" />
Parameter Type Description
Image string? Image URL
Title string? Card title (overlay)
Description string? Card description (overlay)
Item TItem? Auto-map via [BzImage] attrs

BzBentoMetric

KPI/statistic display with trend indicator:

<BzBentoMetric Value="12,847" Label="Active Users" Trend="+23%" IconText="👥" />
Parameter Type Required Description
Value string Yes The metric value (e.g., "1,234", "$48K")
Label string Yes Description of the metric
Trend string? No Trend indicator (+green, -red)
IconText string? No Emoji icon (e.g., "📈")
Icon RenderFragment? No Custom icon component

BzBentoFeature

Feature showcase with icon:

<BzBentoFeature ColSpan="2"
                IconText="⚡"
                Label="Lightning Fast"
                Description="Built for performance" />
Parameter Type Required Description
Label string Yes Feature name
Description string? No Feature description
IconText string? No Emoji icon
Icon RenderFragment? No Custom icon (SVG, etc.)

BzBentoQuote

Testimonial/quote display:

<BzBentoQuote ColSpan="2"
              Text="This component saved us weeks!"
              Author="Jane Doe"
              Role="Tech Lead"
              Avatar="images/jane.jpg" />
Parameter Type Description
Text string? Quote text
Author string? Author name
Role string? Author's role/title
Avatar string? Author's avatar URL
Item TItem? Auto-map via [BzDescription] attrs

Items Mode

For simple uniform image grids, you can use Items Mode with the Items parameter. Mark your model with [BzImage] and [BzTitle] attributes, and the Source Generator creates the template automatically.

<BzBento TItem="Product" Items="products" Columns="4" OnItemSelected="HandleClick" />

See Composition Mode for full layout control with metrics, features, and embedded components.

API Reference

BzBento Parameters

Parameter Type Default Description
Items IEnumerable<TItem>? null Collection for Items mode
ChildContent RenderFragment? null Content for Composition mode
Columns int 4 Grid columns (1-12)
Gap int 16 Gap between items in pixels
Theme BzTheme Glass Visual theme
AnimationEnabled bool true Enable entrance animations
StaggerDelay int 50 Animation delay per item (ms)
OnItemSelected EventCallback<TItem> - Item click callback
ItemTemplate RenderFragment<TItem>? null Custom item template
LoadingTemplate RenderFragment? null Custom loading state
EmptyTemplate RenderFragment? null Custom empty state

Themes

<BzBento Items="items" Theme="BzTheme.Glass" />   
<BzBento Items="items" Theme="BzTheme.Dark" />    
<BzBento Items="items" Theme="BzTheme.Light" />   
<BzBento Items="items" Theme="BzTheme.Minimal" /> 

Responsive Behavior

Breakpoint Columns Gap
Desktop (>991px) As configured As configured
Tablet (<=991px) 2 12px
Mobile (<=600px) 1 8px

CSS Customization

Override CSS variables for custom styling:

.my-bento {
  --bzb-columns: 3;
  --bzb-gap: 24px;
  --bzb-card-radius: 12px;
  --bzb-bg: rgba(100, 50, 200, 0.1);
}
<BzBento Items="items" CssClass="my-bento" />

How It Works

Source Generator Magic

When you mark a property with [BzImage], the BlazzyMotion Source Generator automatically creates a registration function during compilation:

// Auto-generated at compile-time
internal static class BzMappingRegistration_Product
{
    [ModuleInitializer]
    internal static void Register()
    {
        BzRegistry.Register<Product>(item => new BzItem
        {
            ImageUrl = item.ImageUrl,
            Title = item.Name,
            OriginalItem = item
        });
    }
}

The [ModuleInitializer] attribute ensures registration runs automatically at application startup - zero reflection, zero configuration.

Composition Mode Rendering

In Composition Mode, BzBento uses CSS Grid with grid-auto-flow: dense to automatically fill gaps:

  1. Each BzBentoItem, BzBentoCard, etc. becomes a grid item
  2. ColSpan and RowSpan control grid-column and grid-row CSS properties
  3. The dense algorithm places items efficiently without leaving gaps

Performance

  • Zero Runtime Overhead - Mapping functions generated at compile-time
  • Zero Reflection - Uses [ModuleInitializer] for automatic registration
  • GPU Accelerated - Animations use will-change: transform, opacity
  • Intersection Observer - Only animates items when they enter viewport
  • CSS Grid Native - Browser-optimized layout engine

Troubleshooting

Template Not Generated:

  • Ensure [BzImage] is on a public string property
  • Rebuild the project
  • Add @using BlazzyMotion.Core.Attributes

Grid Items Not Visible:

  • Check that Items is not null or empty
  • Verify image URLs are accessible

Animations Not Working:

  • Verify AnimationEnabled="true"
  • Check browser Intersection Observer support

Browser Support

Browser Version
Chrome 88+
Firefox 78+
Safari 14+
Edge 88+

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

git clone https://github.com/Blazzy-Motion/BlazzyMotion.git
cd BlazzyMotion
dotnet build
dotnet test

License

MIT License - see LICENSE for details.

Author

Support

If you find BlazzyMotion.Bento useful, please consider:

  • Giving it a star on GitHub
  • Sharing it with other Blazor developers
  • Reporting bugs or suggesting features via GitHub Issues

For questions or support, please open an issue on GitHub.


Part of the BlazzyMotion component ecosystem.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 447 2/13/2026
1.0.1 275 2/7/2026
1.0.0 151 2/6/2026
1.0.0-preview1 144 2/1/2026