Styles and Themes
The Grid Lite comes with four distinct themes - Bootstrap, Material, Fluent and Indigo. The grid and its UI components have the themes baked in, but the component requires a global stylesheet for palettes, typography and other global configurations to work.
Loading a Base Themes
If the app also uses the IgniteUI.Blazor.Lite or IgniteUI.Blazor package, keep that package’s theme stylesheet. It styles the grid too, so the app doesn’t need the stylesheets below.
An app that uses only the Grid Lite links one of the themes the IgniteUI.Blazor.GridLite package ships, in the host page: Components/App.razor in a Blazor Web App, or wwwroot/index.html in a standalone Blazor WebAssembly app.
<link href="_content/IgniteUI.Blazor.GridLite/themes/light/bootstrap.css" rel="stylesheet" />
| Theme | Variant | Path |
|---|---|---|
| Bootstrap | Light | _content/IgniteUI.Blazor.GridLite/themes/light/bootstrap.css |
| Bootstrap | Dark | _content/IgniteUI.Blazor.GridLite/themes/dark/bootstrap.css |
| Material | Light | _content/IgniteUI.Blazor.GridLite/themes/light/material.css |
| Material | Dark | _content/IgniteUI.Blazor.GridLite/themes/dark/material.css |
| Fluent | Light | _content/IgniteUI.Blazor.GridLite/themes/light/fluent.css |
| Fluent | Dark | _content/IgniteUI.Blazor.GridLite/themes/dark/fluent.css |
| Indigo | Light | _content/IgniteUI.Blazor.GridLite/themes/light/indigo.css |
| Indigo | Dark | _content/IgniteUI.Blazor.GridLite/themes/dark/indigo.css |
In the sample below, you can preview all the default base themes.
Creating Custom Themes
Aside from the default themes shipped with the Grid Lite package, you can further customize the look and feel of your data grid by using an alternate set of CSS custom properties.
.grid-sample {
--header-background: #494949;
--header-text-color: #f2c43c;
--cell-active-border-color: #f2c43c;
--row-hover-background: #707070;
--row-hover-text-color: #f2c43c;
}
<IgbGridLite class="grid-sample" />
Here is an example showcasing the custom theming from above.
API References
Additional Resources
Our community is active and always welcoming to new ideas.