UnoCSS
UI library · Free
A configurable atomic CSS engine: it generates used utilities on demand and lets you define custom rules and presets.
Also known as: unocss/unocss

What you can use for free
UnoCSS code is available free of charge for local and commercial projects, subject to its license.
Paid features and costs
This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.
Access and limitations
UnoCSS code is available free of charge for local and commercial projects, subject to its license. This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.
Use cases
- UI components and behavior
- An app using the required tech stack and its own design
- Generate atomic CSS from classes used in the project
- Define custom rules and presets for utility styles
Example workflow
A possible workflow; this is not a report of hands-on testing.
UI components and behavior with UnoCSS.
Before you start
- A working CSS; Vite; JavaScript project and a specific use case: UI components and behavior.
- A design, interface states, or dataset; target screens and accessibility requirements.
Steps
- Check the project's stack and version against the current UnoCSS documentation; add the package or the required source component.
- Implement the selected workflow with the supplied data, adapting styles and states to the project.
- Check the result in the target environment, remove sample data, and retain the notices required by the license.
Check your result
- The example works in the chosen tech stack, including target dimensions and input errors.
- Dependency size, keyboard behavior, and reduced motion suit the task; license terms are met.
Choosing UnoCSS
UI components and behavior
Choose this when
- UI components and behavior
- An app using the required tech stack and its own design
- Generate atomic CSS from classes used in the project
Consider alternatives when
- When choosing for this topic, compare UnoCSS with Angular Material. A candidate to compare: both product pages list the use case “UI components and behavior”. Implementation approach and compatibility are checked separately.
- When choosing for this topic, compare UnoCSS with Bits UI. A candidate to compare: both product pages list the use case “UI components and behavior”. Implementation approach and compatibility are checked separately.
Requirements
- For extraction from .js and .ts in the described pipeline, include them in content or use @unocss-include. Presets define utilities; the core does not contain a fixed collection.
Things to consider
- Costs and limits of free use: This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.
- Terms of use: MIT: free commercial use of UnoCSS code, with the license text and notices retained.
- Classes obtained only at runtime may have no CSS. A separate @unocss/runtime exists for runtime generation; a build-time integration does not replace it.
Frequently asked questions
What can you use for free in UnoCSS?
UnoCSS code is available free of charge for local and commercial projects, subject to its license.
What additional costs might arise with UnoCSS?
This library does not require a paid plan. Development and hosting of the finished application are separate from the free code license.
What terms of use matter for UnoCSS?
MIT: free commercial use of UnoCSS code, with the license text and notices retained.
How do you get started with UnoCSS?
Check the project's stack and version against the current UnoCSS documentation; add the package or the required source component. Implement the selected workflow with the supplied data, adapting styles and states to the project. Check the result in the target environment, remove sample data, and retain the notices required by the license.
Why does UnoCSS not generate a style for a dynamically assembled class name?
During the build, UnoCSS extracts statically present utility names and generates CSS. A string such as p-${size} does not enumerate every possible value; the documentation recommends a safelist or an object containing complete static names.
Related tasks and approaches
- Angular Material
A candidate to compare: both product pages list the use case “UI components and behavior”. Implementation approach and compatibility are checked separately.
- Bits UI
A candidate to compare: both product pages list the use case “UI components and behavior”. Implementation approach and compatibility are checked separately.
- D3
A candidate to compare: both product pages list the use case “UI components and behavior”. Implementation approach and compatibility are checked separately.
License
MIT: free commercial use of UnoCSS code, with the license text and notices retained.
MIT — permissive license
You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.
License termsTechnologies and topics
- CSS
- Vite
- JavaScript
- utilities
Sources
- Official website · unocss.dev
- Official source · github.com
- Documentation and use · github.com
- License · github.com
- Full MIT text · github.com
- Official source · raw.githubusercontent.com
- License · raw.githubusercontent.com
- Catalog / discovery source · open-source-tools.com
- Official source · raw.githubusercontent.com
- Official source · unocss.dev