Unstyled mode will let you control which KendoReact components use the default CSS classes and which you want to style on your own.
If there’s one thing we can feel pretty safe assuming about React developers, it’s that they prefer to do things their own way. After all, one of the main perks of the React approach is the fact that it’s a library, not a framework—the less prescriptive, batteries-NOT-included approach allows devs to pick and choose their tech stack as they wish.
The nice thing about Progress KendoReact is that it can meet you were you are, regardless of your personal preference. If you like to keep things light and run with Vite, KendoReact can do that. But if you prefer to use a full React framework, we do that too! And now, that extends to styling as well.
Some prefer the grab-and-go approach of a CSS library like Tailwind or Uno, while others like to write their CSS by hand … OK, maybe that’s just me. Whichever one you prefer, the new KendoReact Unstyled mode allows you to leverage all the power and functionality of the KendoReact components you know and love—without having to work with (or around) our default CSS classes.
KendoReact Unstyled mode removes the default KendoReact CSS classes from the components. That allows you to:
!important
s)You can even use a mix of our pre-made Themes and Unstyled components, if there are only a few that you want to style differently. It’s super adaptable, incredibly flexible and—of course—easy to implement. Let’s take a look.
To use components in Unstyled mode, all you have to do is wrap the component in the UnstyledContext provider and pass the predefined CSS classes object in as a value.
<UnstyledContext.Provider value={customStyles}>
<Button>Learn More</Button>
</UnstyledContext.Provider>
That makes it a piece of cake to combine KendoReact with your favorite third-party CSS library. In fact, there’s a great sample app our dev team created to show off just how simple it is to integrate Tailwind. Check it out or fork it as the basis for your own project!
We’ve already talked about the perks of being able to leverage a third-party CSS library, but why else might you reach for Unstyled mode?
Right now, the following components can be used with Unstyled mode:
We’ll keep adding to this list, so keep an eye on our docs for all the latest info. And if you have a component that you’d like us to prioritize, let us know via the KendoReact Feedback Portal!
Kathryn Grayson Nanz is a developer advocate at Progress with a passion for React, UI and design and sharing with the community. She started her career as a graphic designer and was told by her Creative Director to never let anyone find out she could code because she’d be stuck doing it forever. She ignored his warning and has never been happier. You can find her writing, blogging, streaming and tweeting about React, design, UI and more. You can find her at @kathryngrayson on Twitter.