Uniform is super easy to get started and setup, all you need to do is add Uniform as a module to your
.scss project or use the precompiled
.css file. You can get started using the following ways:
- Use npm to install the Uniform package.
- Use the jsDelivr CDN to link directly to the Uniform stylesheet.
- Clone or download the project directly from the GitHub repository.
The native installation is the recommended way to get setup. Native setups provide the full functionality of Uniform CSS giving you access to customization and useful helper functions.
If you have Node.js installed, you can load Uniform as a dependency. Alternatively you can download or clone the project directly.
# Install dependencies
npm install uniformcss
# or Clone project
git clone https://github.com/UniformCSS/UniformCSS
Add the following line to your main
.scss stylesheet to add Uniform in your project.
@use "uniform" as *;
// or the following if using the npm option
@use "../node_modules/uniformcss/sass/uniform" as *;
Compile your Sass project using your preferred CSS preprocessor. Optionally, the Uniform
package.json provides useful build scripts you can run to compile and watch Sass. For more information please check out the build scripts page.
npm run uniform
Please note, Uniform CSS features newer Sass functionality and therefore require
1.33.0and up to compile correctly.
Import the compiled stylesheet to your
<head> inside your
html and you will now have access to all the Uniform goodness.
<link rel="stylesheet" href="uniform.css" />
Optionally, you can customize Uniform directly in your
.scss stylesheet. For more information, visit configuration.
@use "uniform" as * with (
If you're unfamiliar with the
@userule or configuring modules in this way, you can learn more about the new Sass module system here.
For a even quicker way to get started, simply add the following stylesheet in the head of your project.
<link href="https://cdn.jsdelivr.net/UniformCSS/UniformCSS/sass/uniform.min.css" rel="stylesheet" />
Unlike the native installation, using the pre-compiled version of Uniform will only allow for limited customizations, you will not get access to more advanced customization options such as prefixing and custom variants.