Skip to main content
twblazor
Home
  • Get started
  • Tailwind with Blazor
  • Why twblazor?
  • Theme
  • Class Merge
    • Configuring localization
    • RTL Provider
  • Breadcrumb
  • Card
  • Carousel
  • Collapse
  • Footer
  • MenuNew
  • Navbar
  • On This PageNew
  • Sidebar
  • Stepper
  • Tabs
  • Tree List
  • AutocompleteNew
  • Button
  • Checkbox
  • Color Picker
    • Date
    • Date Range
    • Datetime
    • Datetime Range
    • Time
    • Time Range
  • File Upload
  • NumericNew
  • Radio Button
  • RatingNew
  • Select
  • Slider
  • Switch
  • Textfield
  • Alert
  • Avatar
  • Chip
  • Icon
  • Progress
  • Skeleton
  • Spinner
  • TooltipNew
  • Data Table
  • Pagination
  • Pick List
  • BarcodeNew
  • QR CodeNew
  • CalendarNew
  • Table
  • Overview
  • Area
  • Bar
  • Box Plot
  • Bullet
  • Bump
  • Candlestick
  • Column
  • Dot Plot
  • Dumbbell
  • Funnel
  • Gantt
  • Gauge
  • Heatmap
  • Histogram
  • Icon
  • Line
  • Lollipop
  • Matrix
  • Nightingale
  • Parallel Coordinates
  • Pie
  • Quadrant
  • Radar
  • Radial Bar
  • Range
  • Scatter
  • Slope
  • Small Multiples
  • Strip Plot
  • Treemap
  • Waffle
  • Waterfall
  • Arc Diagram
  • Barcode
  • Beeswarm
  • Bump Area
  • Categorical Scatter
  • Chord Diagram
  • Circular Treemap
  • Contour
  • Convex Treemap
  • Density Plot
  • Dendrogram
  • Euler Diagram
  • Flowchart
  • Hexagonal Binning
  • Horizon
  • Marimekko
  • Network Diagram
  • Radial Histogram
  • Ridgeline
  • Sankey
  • Stream Graph
  • Sunburst
  • Venn Diagram
  • Violin Plot
  • Word Cloud
  • Dialog Service
  • Toast Service
API DocumentationAI Agents & Skills
Home Get Started
Free, open source and MIT licensed

The Tailwind CSS component library for Blazor

Accessible, themeable components for Blazor Server and WebAssembly. Ship polished UI without wrestling with CSS.

Get started View on GitHub(opens in new tab)
Install
dotnet add package twblazor

Why twblazor?

Everything you need to build clean, consistent interfaces.

Fast to build

25+ ready-made components mean you're shipping features, not fighting CSS.

Fully customisable

Tailwind-powered styling that adapts to your brand, in light and dark mode.

Composable

Simple, parameter-driven APIs that feel natural if you already know Blazor.

Accessible by default

Sensible ARIA attributes and keyboard support baked into every component.

Tailwind and Blazor, working together

twblazor is a Blazor components library for teams who already use Tailwind CSS.

Tailwind CSS with Blazor How Tailwind finds your classes and how twblazor themes them. Why twblazor? MIT licensed, Tailwind native and styled in your own project. Install guide Add the package to a Server or WebAssembly app in nine steps.

Real components. Ready for your app.

Go ahead and try them. Every example here is a live twblazor component.

Sign in

Checkout stepper

  1. AccountCreate your login
  2. PreferencesTune your setup
  3. DoneAll set
33%

Step 1 of 3: Account

Project settings

Manage how your team ships

Visibility
Storage used 7.2 of 10 GB
72%
Storage by folder7.2 GB across 10 folders
Videos
Photos
Projects
Music
Downloads
Backups
VideosSize 2.5 GBShare 34.7%
PhotosSize 1.8 GBShare 25%
ProjectsSize 1.1 GBShare 15.3%
MusicSize 0.6 GBShare 8.3%
DocumentsSize 0.4 GBShare 5.6%
DownloadsSize 0.3 GBShare 4.2%
BackupsSize 0.2 GBShare 2.8%
AppsSize 0.1 GBShare 1.4%
FontsSize 0.1 GBShare 1.4%
TempSize 0.1 GBShare 1.4%

Release health

v2.4.0
Storage nearing capacity.
Deploys
128
Failed
3
Avg. time
4m
Response time95th percentile, last 24 hours
0 ms200 ms400 ms600 ms800 ms1,000 ms
0 ms200 ms400 ms600 ms800 ms1,000 ms
00:00Web app 132 msAPI 188 msDatabase 24 msWorkers 342 ms
01:00Web app 128 msAPI 182 msDatabase 22 msWorkers 335 ms
02:00Web app 121 msAPI 176 msDatabase 21 msWorkers 328 ms
03:00Web app 118 msAPI 171 msDatabase 20 msWorkers 322 ms
04:00Web app 124 msAPI 179 msDatabase 22 msWorkers 331 ms
05:00Web app 139 msAPI 196 msDatabase 25 msWorkers 349 ms
06:00Web app 158 msAPI 221 msDatabase 29 msWorkers 372 ms
07:00Web app 181 msAPI 248 msDatabase 33 msWorkers 398 ms
08:00Web app 204 msAPI 274 msDatabase 36 msWorkers 421 ms
09:00Web app 226 msAPI 292 msDatabase 39 msWorkers 447 ms
10:00Web app 241 msAPI 305 msDatabase 41 msWorkers 468 ms
11:00Web app 252 msAPI 318 msDatabase 43 msWorkers 512 ms
12:00Web app 258 msAPI 341 msDatabase 44 msWorkers 604 ms
13:00Web app 249 msAPI 372 msDatabase 42 msWorkers 742 ms
14:00Web app 243 msAPI 418 msDatabase 41 msWorkers 868 ms
15:00Web app 236 msAPI 476 msDatabase 58 msWorkers 912 ms
16:00Web app 228 msAPI 538 msDatabase 40 msWorkers 834 ms
17:00Web app 215 msAPI 602 msDatabase 38 msWorkers 701 ms
18:00Web app 198 msAPI 648 msDatabase 35 msWorkers 588 ms
19:00Web app 182 msAPI 612 msDatabase 32 msWorkers 497 ms
20:00Web app 166 msAPI 541 msDatabase 29 msWorkers 441 ms
21:00Web app 151 msAPI 463 msDatabase 27 msWorkers 402 ms
22:00Web app 142 msAPI 392 msDatabase 25 msWorkers 371 ms
23:00Web app 136 msAPI 331 msDatabase 24 msWorkers 352 ms
00:0002:0004:0006:0008:0010:0012:0014:0016:0018:0020:0022:00
Deploys per dayLast 14 days
05101520
05101520
26 SepSucceeded 3Failed 0
27 SepSucceeded 2Failed 0
28 SepSucceeded 12Failed 1
29 SepSucceeded 14Failed 0
30 SepSucceeded 13Failed 0
1 OctSucceeded 15Failed 1
2 OctSucceeded 11Failed 0
3 OctSucceeded 2Failed 0
4 OctSucceeded 1Failed 0
5 OctSucceeded 13Failed 0
6 OctSucceeded 12Failed 0
7 OctSucceeded 14Failed 1
8 OctSucceeded 7Failed 0
9 OctSucceeded 6Failed 0
26 Sep28 Sep30 Sep2 Oct4 Oct6 Oct8 Oct

The deepest Tailwind theming of any Blazor library

twblazor is the first and only Tailwind CSS component library for Blazor built around full, typed, component-level theming. Every visual detail of every component is a plain Tailwind class you own and can override, not a black box baked into a compiled DLL.

Every class, typed and overridable

Each component has its own C# theme class, like TwButtonTheme, with every class exposed as a named property.

Reusable design tokens

Set a color or shade once and every component stays in sync.

Global defaults, local overrides

Set a default once, and any single instance can still override it.

Real Tailwind, real JIT

Themes are plain C# string literals, so Tailwind always sees them. No safelists or build workarounds.

CSHARP
builder.Services.AddTwBlazor(_ => { }, () => new TwBlazorTheme
{
    // ...position, colors, shadows, rounded...
    Components =
    [
        new TwButtonTheme
        {
            Base = "inline-flex items-center gap-2 rounded-full font-semibold",
            Padding = "px-8"
        },
        new TwInputTheme
        {
            DefaultInputVariant = InputVariant.Outlined
        }
        // ...every other component you use
    ]
});

See it in action

Five well-known looks, one component library

Each of these pages is the same twblazor components with a different Theme.cs. No component was changed and no CSS was overridden: the colors, corners, shadows, type and spacing all come from the theme file, which is shown in full on each page.

  • Microsoft-inspired A crisp, quiet system look: 2px corners, hairline borders, subtle elevation and inputs that underline on focus. See the theme
  • Apple-inspired Generous space and soft geometry: pill buttons, large rounded tiles, no shadows and a translucent navigation bar. See the theme
  • LEGO-inspired Bright and friendly: a yellow bar, orange pill buttons with dark text, blue links, bold type and flat white cards. See the theme
  • Tesco-inspired Clear and practical: confident blue, pill buttons with large touch targets, flat bordered tiles and red for offers. See the theme
  • Trading 212-inspired Clean and confident: bright blue pill buttons, large soft cards, cool neutral surfaces and green and red kept for gains and losses. See the theme

twblazor is not affiliated with, endorsed by or sponsored by Microsoft, Apple, the LEGO Group, Tesco or Trading 212. These are independent examples made to show what a custom theme can do, and are not those companies' websites. Product names, prices, offers and market data are illustrative, and nothing here is financial advice. Logos and pictures come from each company's own website and remain its property, and all trademarks belong to their owners.

Built in. No npm package, no JavaScript.

Tailwind class merging, built right in

Pass Class="px-3" to any component and it replaces the theme's px-6 instead of fighting it. twblazor ships its own C# port of tailwind-merge, so your class always wins and there is nothing to install or set up.

  • The last class wins Conflicts are settled by what you wrote last, not by the order of Tailwind's stylesheet.
  • Understands Tailwind v4 Variants, arbitrary values, the important modifier and prefixes, checked against tailwind-merge on more than 700 class strings.
  • Yours to configure Teach it your own utilities, set your Tailwind prefix or turn it off, all from AddTwBlazor.
See how class merging works
A live example of class merging. Choose an example to change the class passed to the component.
Theme
inline-flexitems-centerrounded-mdbg-purple-700Replaced: px-6py-2text-smfont-semiboldtext-white
Your Class
px-3

Rendered

inline-flex items-center rounded-md bg-purple-700 py-2 text-sm font-semibold text-white px-3

Save changes

25 languages, built in

Speaks your users' language, out of the box

Every label, placeholder, validation message and screen reader announcement comes from a resource file, and dates and times follow the culture your application runs under. Components pick the language up by themselves, with nothing to set up.

  • One .resx file per language English is built in and the rest ship in the package. Add or reword any string with resource files of your own.
  • Dates and times that fit Month names, the first day of the week and 12 or 24 hour time follow the culture, with British formats as the fallback.
  • Configured in AddTwBlazor Pin a culture, set a format or swap the localizer service, all from the options you already pass.
See how localization works
  • English English
  • 中文(简体) Chinese, Simplified
  • Español Spanish
  • हिन्दी Hindi
  • Português Portuguese
  • বাংলা Bengali
  • Русский Russian
  • 日本語 Japanese
  • پنجابی Western Punjabi
  • Türkçe Turkish
  • Tiếng Việt Vietnamese
  • 中文(繁體) Chinese, Traditional
  • العربية Arabic
  • मराठी Marathi
  • తెలుగు Telugu
  • 한국어 Korean
  • தமிழ் Tamil
  • اردو Urdu
  • Bahasa Indonesia Indonesian
  • Deutsch German
  • Français French
  • Basa Jawa Javanese
  • فارسی Persian
  • Italiano Italian
  • Polski Polish
  • ... and 15 more languages

Translations other than English were produced by AI and have not been reviewed by native speakers. Spotted something that could read better? Contribute a correction.

CSHARP
builder.Services.AddTwBlazor(options =>
{
    // Reword a string or add a language with your own .resx files.
    options.Localization.AddResource(MyStrings.ResourceManager);

    // Dates and times follow the culture. Set only what you want to change.
    options.Localization.Formats.FirstDayOfWeek = DayOfWeek.Monday;
    options.Localization.Formats.Use12HourClock = false;
}, Theme.CreateTheme);

Right to left, built in

Reads right to left, without a second stylesheet

Arabic, Hebrew, Persian and Urdu turn the whole layout around. Every component mirrors itself for those languages: spacing, icons, panels and the arrow keys all follow the direction of the text.

  • Follows the language A right to left culture mirrors every component by itself. Set the direction yourself to pin it.
  • Keys that match the screen Left and Right swap in tabs, trees, calendars and carousels, so each arrow still moves the way it points.
  • Mix directions on one page Wrap any part of a page in TwDirectionProvider to give it a direction of its own.
See how right to left works
A live example of the same components laid out left to right and right to left. Choose a direction to switch.

Rendered

<TwDirectionProvider Direction="TextDirection.RightToLeft">

تم حفظ التغييرات.

Up and running in minutes

Install the package, register the services, start dropping in components.

HTML
<TwButton Label="Get Started" Color="Color.Primary" />
<TwAlert Color="Color.Success" Dense>Everything is working!</TwAlert>

Join the discussion on Discord

Ask questions, share what you're building and help shape what comes next.

Join the Discord (opens in a new tab)

Ready to build something great?

Jump into the docs and start assembling your UI with twblazor components.

Get started Star on GitHub (opens in a new tab)

twblazor is and always will be free and open source. We believe great tooling should be accessible to every developer, so the library is released under the MIT license and built in the open, with contributions from the community.

Discord (opens in a new tab) • GitHub (opens in a new tab) • Documentation (opens in a new tab) • MIT License (opens in a new tab) • llms.txt (opens in a new tab)

twblazor is and always will be free and open source.

An unhandled error has occurred. Reload