The Tailwind CSS component library for Blazor
Accessible, themeable components for Blazor Server and WebAssembly.
dotnet add package twblazorReal components. Ready for your app.
Built for your next dashboard, checkout, admin panel, sign-in form or settings page.
Every example is live. Try them.
Forms
Sign-in, checkout and settings forms, built from the same inputs.
Checkout stepper
Plain Blazor parameters. No surprises.
Open docs- 120+ components
- 50+ chart types
- Keyboard and screen reader ready
- 25 languages
- Free and MIT licensed
Accessible by default
Built for everyone, keyboard to screen reader
Every component follows the WAI-ARIA patterns, so the people using your app can do it their way. Nothing to switch on.
- Keyboard first Tab, arrow keys, Home, End and Escape work in every component, as WAI-ARIA describes.
- Screen reader ready Roles, names and live announcements, translated into every shipped language.
- Focus you can see A clear focus ring on every control, and focus returned where it belongs when a popup closes.
- Calm when asked Animations stop when the system asks for reduced motion.
- High contrast mode Windows high contrast colours are respected, so states stay visible.
- Tested with axe-core Every docs page is scanned for accessibility issues in the test suite.
The deepest Tailwind theming of any Blazor library
Every visual detail is a plain Tailwind class you own, typed per component. No black box in a DLL.
Every class, typed and overridable
One C# theme class per component, every class a named property.
Reusable design tokens
Set a colour once and every component follows.
Global defaults, local overrides
Set a default once, override any instance.
Real Tailwind, real JIT
Plain string literals Tailwind can see. No safelists.
// Change the theme, not the componentDefaultRounded = Rounded.Full,DefaultShadow = Shadow.Lg,Primary = "bg-pink-700",
- Corners: full
- Shadow: large
- Colour: pink
See it in action
Well-known looks, one component library
Same components, different Theme.cs.
- Microsoft-inspired See the theme
- LEGO-inspired See the theme
- Tesco-inspired See the theme
- Trading 212-inspired See the theme
Independent examples. twblazor is not affiliated with or endorsed by these companies.
Tailwind and Blazor, working together
Built in. No npm, no JavaScript.
Tailwind class merging, built right in
Pass Class="px-3" and it replaces the theme's px-6. Your class always wins.
- The last class wins A C# port of tailwind-merge. Nothing to install.
- Understands Tailwind v4 Variants, arbitrary values and prefixes, tested on 700+ cases.
- Yours to configure Custom utilities, a prefix, or off, from AddTwBlazor.
- Theme
- inline-flexitems-centerrounded-mdbg-purple-700
Replaced: 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
25 languages, built in
Speaks your users' language, out of the box
Every label, message and screen reader announcement is translated, and dates follow the culture. Nothing to set up.
- One .resx file per language Add or reword any string with your own resource files.
- Dates and times that fit Week starts and 12 or 24 hour time follow the culture.
- Configured in AddTwBlazor Pin a culture, set a format or swap the localizer.
- English English
- 中文(简体) Chinese, Simplified
- Español Spanish
- हिन्दी Hindi
- Português Portuguese
- বাংলা Bengali
- Русский Russian
- 日本語 Japanese
- پنجابی Western Punjabi
- Türkçe Turkish
- and 15 more languages
Non-English translations were produced by AI and are not yet reviewed. Suggest a correction.
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 mirror every component: spacing, icons, panels and arrow keys.
- Follows the language Right to left cultures mirror automatically.
- Keys that match the screen Arrow keys move the way they point, in every component.
- Mix directions on one page Wrap any part in TwDirectionProvider.
Rendered
<TwDirectionProvider Direction="TextDirection.RightToLeft">
Up and running in minutes
Install, register, build.
$ dotnet add package twblazor<TwButton Label="Get Started" /><TwAlert Color="Success">Working!</TwAlert>Join the discussion on Discord
Ask questions and share what you're building.
Ready to build something great?
Start with the docs.
Free and MIT licensed, always. Built in the open with the community.