Skip to main content
twblazor
Home
  • Get started
  • Tailwind with Blazor
  • Why twblazor?
  • Theme
  • Class Merge
    • Configuring localization
    • RTL Provider
  • Breadcrumb
  • Card
  • Carousel
  • Collapse
  • Context Menu
  • Drawer
  • Footer
  • Menu
  • Navbar
  • On This Page
  • Separator
  • Sidebar
  • Stepper
  • Tabs
  • Tree List
  • Container
  • Flex
  • Grid
  • Text
  • Link
  • Button
  • Form
    • AutocompleteNew
    • Checkbox
    • Color Picker
    • Date Picker
    • Date Range Picker
    • Datetime Picker
    • Datetime Range Picker
    • File Upload
    • Input GroupNew
    • NumericNew
    • Masked InputNew
    • Radio Button
    • Range SliderNew
    • RatingNew
    • Select
    • Slider
    • Switch
    • Tag InputNew
    • Text EditorNew
    • Textfield
    • Time Picker
    • Time Range Picker
  • Toggle
  • Toggle Group
  • Alert
  • Avatar
  • Badge
  • Chip
  • Empty
  • Icon
  • Popover
  • Progress
  • Skeleton
  • Spinner
  • Tooltip
  • Data Table
  • SpreadsheetNew
  • Column Filter Editor
  • Pagination
  • Pick List
  • Barcode
  • QR Code
  • Calendar
  • Table
  • Attachment
  • Overview
    • Bar
    • Bullet
    • Column
    • Dot Plot
    • Dumbbell
    • Icon
    • Lollipop
    • Radial Bar
    • Range
    • Word Cloud
    • Area
    • Bump
    • Bump Area
    • Candlestick
    • Gantt
    • Horizon
    • Line
    • Slope
    • Small Multiples
    • Stream Graph
    • Funnel
    • Gauge
    • Marimekko
    • Nightingale
    • Pie
    • Treemap
    • Waffle
    • Waterfall
    • Circular Treemap
    • Convex Treemap
    • Dendrogram
    • Sunburst
    • Barcode
    • Beeswarm
    • Box Plot
    • Density Plot
    • Histogram
    • Radial Histogram
    • Ridgeline
    • Strip Plot
    • Violin Plot
    • Categorical Scatter
    • Contour
    • Hexagonal Binning
    • Quadrant
    • Scatter
    • Heatmap
    • Matrix
    • Parallel Coordinates
    • Radar
    • Arc Diagram
    • Chord Diagram
    • Flowchart
    • Network Diagram
    • Sankey
    • Euler Diagram
    • Venn Diagram
  • Bubble
  • Marker
  • Message
  • 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.

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

Real components. Ready for your app.

Built for your next dashboard, checkout, admin panel, sign-in form or settings page. Built for your next dashboard.checkout.admin panel.sign-in form.settings page.dashboard.

Every example is live. Try them.

Example colour

Forms

Sign-in, checkout and settings forms, built from the same inputs.

Sign in

Welcome back. Sign in to carry on.

Upgrade to Pro

Billed monthly. Cancel any time.

Total £36

Create a database

Pick a plan and a region.

Plan
100

100 GB

Estimated cost

£39 a month

Set up your workspace

Make it look like your brand.

PNG or SVG, up to 2 MB.

A Atlas Labs

Checkout stepper

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

Book a call

Find a time that works for you.

Leave a review

Tell us how it went.

Project settings

Manage how your team ships

Visibility

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.

Three lines of Theme.cs restyling a live button, shown beside the button as it was: fully rounded corners, a large shadow and a pink primary colour.
Theme.cs
// Change the theme, not the componentDefaultRounded = Rounded.Full,DefaultShadow = Shadow.Lg,Primary = "bg-pink-700",
Before
After
  • Corners: full
  • Shadow: large
  • Colour: pink
Restyled from Theme.cs, no CSS

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

Tailwind CSS with Blazor How your classes are found and themed. Why twblazor? MIT licensed and Tailwind native. Install guide Server or WebAssembly in nine steps.

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.
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, 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.
See how localization works
  • 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.

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 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.
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, register, build.

Installing twblazor, then two lines of markup and the button and alert they render.
Terminal and Home.razor
$ dotnet add package twblazor<TwButton Label="Get Started" /><TwAlert Color="Success">Working!</TwAlert>
Preview
twblazor installed
Get Started
Working!

Join the discussion on Discord

Ask questions and share what you're building.

Join the Discord (opens in a new tab)

Ready to build something great?

Start with the docs.

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

Free and MIT licensed, always. Built in the open with the community.

twblazor

The Tailwind CSS component library for Blazor. Accessible, themeable and MIT licensed.

Discord (opens in a new tab) GitHub(opens in a new tab)

Get started

  • Install guide
  • Theming
  • Class merging
  • Localization

Guides

  • Tailwind CSS with Blazor
  • Why twblazor?
  • Right to left
  • AI agents and skills

Resources

  • API documentation (opens in a new tab)
  • llms.txt (opens in a new tab)
  • MIT License (opens in a new tab)

Community

  • Contributing (opens in a new tab)
  • Code of conduct (opens in a new tab)
  • Report an issue (opens in a new tab)

twblazor is and always will be free and open source.

An unhandled error has occurred. Reload