BlazzyMotion.Marquee 1.0.0

dotnet add package BlazzyMotion.Marquee --version 1.0.0
                    
NuGet\Install-Package BlazzyMotion.Marquee -Version 1.0.0
                    
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.Marquee" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazzyMotion.Marquee" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="BlazzyMotion.Marquee" />
                    
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.Marquee --version 1.0.0
                    
#r "nuget: BlazzyMotion.Marquee, 1.0.0"
                    
#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.Marquee@1.0.0
                    
#: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.Marquee&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=BlazzyMotion.Marquee&version=1.0.0
                    
Install as a Cake Tool

BlazzyMotion.Marquee

A CSS-driven infinite scrolling marquee component for Blazor with logo bars, testimonials, and text tickers.

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

Table of Contents

Features

  • Zero Configuration - Just add [BzImage] and [BzTitle] attributes to your model and the Source Generator handles the rest
  • 3 Display Modes - Logo Bar, Testimonials (auto-detected), and Text Ticker
  • Multi-Row Support - Up to 10 rows with alternating directions and speed variation
  • Staggered Entrance - Items fade in sequentially using IntersectionObserver
  • Pause on Hover + Keyboard - Space/Enter to pause, mouse hover support
  • Multiple Themes - Glass, Dark, Light, and Minimal themes included out of the box
  • Optional Item Click - OnItemClick EventCallback for clickable items
  • Gradient Edge Overlays - Smooth fade-out effect at container edges
  • CSS-Driven Animation - Pure CSS transforms, no JavaScript animation loop

Live Demo

Experience BlazzyMotion.Marquee in action: View Live Demo

BlazzyMotion.Marquee Demo

Quick Start

Installation

dotnet add package BlazzyMotion.Marquee

Or via Package Manager Console:

Install-Package BlazzyMotion.Marquee

No CSS links or service registration needed — everything loads automatically.

Basic Usage

Logo Bar (Zero Config)

Just mark your model with [BzImage] and the component auto-renders logos — no template needed:

@using BlazzyMotion.Marquee.Components
@using BlazzyMotion.Core.Models

<BzMarquee Items="brands" Theme="BzTheme.Glass" />

@code {
    private List<Brand> brands = new()
    {
        new() { LogoUrl = "/logos/github.svg", Name = "GitHub" },
        new() { LogoUrl = "/logos/azure.svg", Name = "Azure" },
        new() { LogoUrl = "/logos/aws.svg", Name = "AWS" }
    };

    public class Brand
    {
        [BzImage] public string LogoUrl { get; set; } = "";
        [BzTitle] public string Name { get; set; } = "";
    }
}
Logo Bar (Custom Template)

Use ItemTemplate for full control over logo rendering:

<BzMarquee Items="brands" Theme="BzTheme.Glass">
    <ItemTemplate Context="brand">
        <img src="@brand.LogoUrl" alt="@brand.Name" style="height: 40px;" />
    </ItemTemplate>
</BzMarquee>
Text Ticker
<BzMarquee Text="Breaking news: BlazzyMotion v1.0 released!"
           Theme="BzTheme.Minimal"
           Speed="40" />
Testimonials

Items with [BzTitle] + [BzDescription] auto-render as testimonial cards:

<BzMarquee Items="reviews" Theme="BzTheme.Dark" Speed="30" />

@code {
    private List<Review> reviews = new()
    {
        new() { Author = "Jane Doe", Quote = "Best Blazor library!", Avatar = "/avatars/jane.jpg" },
        new() { Author = "John Smith", Quote = "Easy to integrate, beautiful results." }
    };

    public class Review
    {
        [BzTitle] public string Author { get; set; } = "";
        [BzDescription] public string Quote { get; set; } = "";
        [BzImage] public string? Avatar { get; set; }
    }
}

Display Modes

Logo Bar Mode

When items have only [BzImage] (and optionally [BzTitle]), the component auto-renders logos with built-in styling. No template needed — zero configuration. Use ItemTemplate for custom rendering when you need full control.

Testimonial Mode

When items have Title + Description mapped via attributes, the component auto-detects and renders testimonial cards with avatar, name, and blockquote. No template needed.

Text Ticker Mode

Set the Text parameter for simple scrolling text. No items, model, or template required. Perfect for news tickers and announcements.

Multi-Row

Display multiple scrolling rows with different directions and speeds:

<BzMarquee Items="brands"
           Rows="3"
           AlternateDirection="true"
           SpeedVariation="0.3"
           Theme="BzTheme.Glass" />
Parameter Description
Rows Number of rows (1-10)
AlternateDirection Even rows scroll in opposite direction
SpeedVariation Speed varies per row (0.0-0.5) for parallax effect

API Reference

Data Parameters

Parameter Type Default Description
Items IEnumerable<TItem>? null Collection of items to display
Text string? null Plain text for ticker mode (overrides Items)
ItemTemplate RenderFragment<TItem>? null Custom template for each item
OnItemClick EventCallback<TItem> - Click callback — items become clickable when set
LoadingTemplate RenderFragment? null Custom loading state
EmptyTemplate RenderFragment? null Custom empty state

Appearance Parameters

Parameter Type Default Description
Theme BzTheme Glass Visual theme: Glass, Dark, Light, or Minimal
Direction BzDirection Left Scroll direction: Left or Right
Speed int 50 Animation speed in pixels per second
Gap int 40 Gap between items (px)
Rows int 1 Number of rows (1-10)
ShowGradientEdges bool true Show gradient fade on edges
FullWidth bool false Span full viewport width
CssClass string? null Additional CSS classes

Behavior Parameters

Parameter Type Default Description
PauseOnHover bool true Pause animation on mouse hover
AlternateDirection bool true Adjacent rows scroll in opposite directions
SpeedVariation double 0.0 Speed variation between rows (0.0-0.5)
StaggerEntrance bool true Enable staggered entrance animation
StaggerDelay int 60 Delay between entrance animations (ms)

Themes

BlazzyMotion.Marquee includes four professionally designed themes:

Glass Theme (Default)

Modern glassmorphism design with blur effect and transparency:

<BzMarquee Items="brands" Theme="BzTheme.Glass" />

Dark Theme

Solid dark background with subtle gradient border:

<BzMarquee Items="brands" Theme="BzTheme.Dark" />

Light Theme

Clean light theme with soft shadows:

<BzMarquee Items="brands" Theme="BzTheme.Light" />

Minimal Theme

No background container, borderless design:

<BzMarquee Items="brands" Theme="BzTheme.Minimal" />

CSS Customization

Override CSS variables for custom styling:

.my-marquee {
    --bzm-speed: 30;
    --bzm-gap: 60px;
    --bzm-gradient-size: 120px;
    --bzm-logo-height: 50px;
    --bzm-logo-opacity: 0.8;
    --bzm-testimonial-width: 400px;
}
<BzMarquee Items="brands" CssClass="my-marquee" />

Available CSS Variables

Variable Default Description
--bzm-speed 50 Animation speed (pixels per second)
--bzm-gap 40px Gap between items
--bzm-container-padding 24px Container internal padding
--bzm-gradient-size 80px Gradient overlay width on edges
--bzm-logo-height 28px Logo image height
--bzm-logo-opacity 0.6 Logo opacity (hover restores to 1)
--bzm-testimonial-width 350px Testimonial card width
--bzm-testimonial-padding 24px Testimonial card padding
--bzm-ticker-font-size 1.1rem Ticker text font size

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_Brand
{
    [ModuleInitializer]
    internal static void Register()
    {
        BzRegistry.Register<Brand>(item => new BzItem
        {
            ImageUrl = item.LogoUrl,
            Title = item.Name,
            OriginalItem = item
        });
    }
}

Rendering Pipeline

  1. Items are mapped via BzRegistry.ToBzItems() using the generated mapper
  2. JavaScript module clones content for seamless infinite scroll
  3. IntersectionObserver triggers stagger entrance animation
  4. CSS @keyframes handles continuous scroll — no JS animation loop

Performance

  • Zero Runtime Overhead - Mapping functions generated at compile-time
  • Zero Reflection - Uses [ModuleInitializer] for automatic registration
  • CSS-Only Animation - Pure CSS transforms, no requestAnimationFrame loop
  • GPU Accelerated - Uses transform: translate3d() for compositor-layer animation
  • Lazy Loading - Images use loading="lazy" for deferred loading

Troubleshooting

Template Not Generated:

  • Ensure [BzImage] or [BzTitle] is on a public string property
  • Rebuild the project to trigger Source Generator
  • Add @using BlazzyMotion.Core.Attributes

Marquee Not Scrolling:

  • Verify content width exceeds container width (cloning needs enough content)
  • Check that JavaScript interop loaded correctly

Items Not Visible:

  • Check that Items is not null or empty
  • Verify image URLs are accessible
  • For testimonials, ensure model has both [BzTitle] and [BzDescription]

Stagger Animation Not Working:

  • Verify StaggerEntrance="true" (default)
  • Check browser IntersectionObserver support
  • Ensure container is visible in viewport

Browser Support

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

Requires CSS animation and @keyframes support. Backdrop-filter for Glass theme gracefully degrades on mobile.

Contributing

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

Building from Source

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

Running Tests

dotnet test

License

MIT License - see LICENSE for details.

Author

Support

If you find BlazzyMotion.Marquee 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.0 195 3/13/2026
1.0.0-preview1 155 2/19/2026