Elegantly Design Your Web Application with the Tailwind CSS Theme | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (175).NET Core  (29).NET MAUI  (208)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (220)BoldSign  (15)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (67)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (101)Streamlit  (1)Succinctly series  (131)Syncfusion  (920)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (37)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (151)Chart  (132)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (633)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (41)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (508)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (11)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (597)What's new  (333)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Elegantly Design Your Application with the Tailwind CSS Theme

Elegantly Design Your Web Application with the Tailwind CSS Theme

Themes are an essential part of an application. They help us design our apps with colors, styles, icons, and more.

Right now, the Tailwind CSS theme is one of the trending CSS frameworks used in developing modern web applications. It contains predefined CSS helper classes to develop an app with less CSS.

Our Syncfusion Essential JS 2 and Blazor platforms provide the Tailwind CSS theme in both dark and light modes. Check out our online demos to view the appearance of the Syncfusion components in Tailwind CSS themes.

Let’s see how to use this theme in your web applications by looking at code examples.

Tailwind CSS themes

Here is how some of our frequently used components (DataGrid, Gantt Chart, Pivot Table, File Manager, Inputs, and Button components) appear with the Tailwind CSS theme.

DataGrid with Tailwind CSS Light Theme
DataGrid with Tailwind CSS Light Theme
DataGrid with Tailwind CSS Dark Theme
DataGrid with Tailwind CSS Dark Theme
Gantt Chart with Tailwind CSS Light Theme
Gantt Chart with Tailwind CSS Light Theme
Gantt Chart with Tailwind CSS Dark Theme
Gantt Chart with Tailwind CSS Dark Theme
Pivot Chart with Tailwind CSS Light Theme
Pivot Chart with Tailwind CSS Light Theme
Pivot Chart with Tailwind CSS Dark Theme
Pivot Chart with Tailwind CSS Dark Theme
File Manager with Tailwind CSS Light Theme
File Manager with Tailwind CSS Light Theme
File Manager with Tailwind CSS Dark Theme
File Manager with Tailwind CSS Dark Theme
Inputs with Tailwind CSS Light Theme
Inputs with Tailwind CSS Light Theme
Inputs with Tailwind CSS Dark Theme
Inputs with Tailwind CSS Dark Theme
Buttons with Tailwind CSS Light Theme
Buttons with Tailwind CSS Light Theme
Buttons with Tailwind CSS Dark Theme
Buttons with Tailwind CSS Dark Theme

Color variables

Syncfusion’s Tailwind CSS theme uses indigo as the primary color and the rest of the colors are selected based on it.

Refer to the following screenshots. We have listed the common color variables used in the Syncfusion Tailwind CSS themes for all UI components.

Color Variables with Light Theme
Color Variables with Light Theme
Color Variables with Dark Theme
Color Variables with Dark Theme

Blazor components

If you want to try out the Tailwind CSS theme in your Blazor application, then you can use either CDN or static assets like NuGet packages.

Refer to the following code examples to use the Tailwind CSS themes using CDN.

Light theme

<head>
    ....
    ....
    <link href="https://cdn.syncfusion.com/blazor/19.2.55/styles/tailwind.css" rel="stylesheet" />
</head>

Dark theme

<head>
    ....
    ....
    <link href=" https://cdn.syncfusion.com/blazor/19.2.55/styles/tailwind-dark.css" rel="stylesheet" />
</head>

The Syncfusion Blazor themes are available as static web assets in Syncfusion.Blazor and Syncfusion.Blazor.Themes NuGet packages.

Add the following reference link inside the <head> element of the ~/Pages/_Host.cshtml file for the Blazor server app or the ~/wwwroot/index.html file for the Blazor WebAssembly app.

  • If you are using individual NuGet packages in your application, then use the following reference link.

Light theme

<head>
    ....
    ....
    <link href="_content/Syncfusion.Blazor.Themes/tailwind.css" rel="stylesheet" />
</head>

 Dark theme

<head>
    ....
    ....
    <link href="_content/Syncfusion.Blazor.Themes/tailwind-dark.css" rel="stylesheet" />
</head>
  • If you are using Blazor NuGet package in your application, then use the following reference link.

Light theme

<head>
    ....
    ....
    <link href="_content/Syncfusion.Blazor/styles/tailwind.css" rel="stylesheet" />
</head>

Dark theme

<head>
    ....
    ....
    <link href="_content/Syncfusion.Blazor/styles/tailwind-dark.css" rel="stylesheet" />
</head>

Note: For more details, refer to the Themes in Syncfusion Blazor Components documentation.

Essential JS 2 components

For the Essential JS 2 suite, the themes are available in the individual and combined CSS files. You can get the combined CSS file from the @syncfusion/ej2 npm package and individual CSS files within the same control repository’s style folder.

The ej2 npm packages have both the CSS and SCSS files for all controls.

Refer to the following code examples.

Light theme

@import "./node_modules/@syncfusion/ej2/tailwind.css";

Dark theme

@import "./node_modules/@syncfusion/ej2/tailwind-dark.css";

All controls SCSS

@import "ej2/<theme_name>.scss";

Note: For more details, refer to Theming in Essential JS 2 Components documentation.

Custom resource generator

You can generate a selective control script (JavaScript ES5) and styles by using the custom resource generator (CRG). It allows you to download the Tailwind CSS and Tailwind CSS dark themes from CRG.

Note: For more details, refer to the Custom Resource Generator demo.

Reference

Use the Tailwind CSS light and dark themes in our Blazor, JavaScript, Angular, React, Vue, JavaScript (ES5), ASP.NET Core, and ASP.NET MVC platforms.

Conclusion

Thanks for reading! In this blog post, we have discussed the Tailwind CSS theme in our Syncfusion Essential JS 2 and Blazor components and how to use them in your application.  We will keep on providing new, standard themes.

For existing customers, the new version of Essential Studio is available for download from the License and Downloads page. If you are not yet a Syncfusion customer, you can try our 30-day free trial to check out our available features.

You can contact us through our support forum or Direct-Trac. We are always happy to assist you!

If you liked this blog post, we think you’ll also like the following articles:

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed