Clarity is an open source design system that brings together UX guidelines, an HTML/CSS framework, and Angular components. Clarity is for both designers and developers.
Clarity’s designs stem from continuous exploration and research. These designs are built into our HTML/CSS components, which can be used with any web UI, regardless of the underlying JavaScript framework. Clarity also offers a set of well-designed and implemented data-bound components built on top of Angular, one of the most popular JavaScript frameworks in the industry.
We offer three approaches for utilizing Clarity: just the UX guidelines, UX guidelines and our HTML/CSS framework, or put everything together with our Angular implementation.
Jumpstart your project with one of our Sketch or Figma-based design resources. Start by downloading the Metropolis fonts. Then download your resources of choice. We recommend that with your UI Library selection, that you also select the matching Icon Library as the two work together.
If you just want to use our HTML/CSS implementations, you need to get the latest code from NPM and then add the assets to your project.
npm install @clr/ui --save
You'll need to include one of the files found at node_modules/@clr/ui/clr-ui.min.css
for the normal theme or node_modules/@clr/ui/clr-ui-dark.min.css
for the dark theme into your build tooling.
You can also load this CSS file from a CDN like you see below. See unpkg.com for more details.
<!-- Load the latest version -->
<link rel="stylesheet" href="https://unpkg.com/@clr/ui/clr-ui.min.css" />
<!-- Or load a specific version -->
<link rel="stylesheet" href="https://unpkg.com/@clr/ui@2.0.0/clr-ui.min.css" />
You can build an Angular app, then install Clarity onto your project.
Create a new Angular application, if you need a quickstart use the 5 Min Quickstart.
Clarity is published as three separate packages on NPM, as well as one dependency.
Install them all by running the following command with NPM.
npm install @cds/core @clr/angular @clr/ui --save
If you are using the Angular CLI, you need to add the angular.json
file.
Find the scripts
and styles
arrays and add the following: "styles": [
"node_modules/@clr/ui/clr-ui.min.css",
... any other styles
]
If you are not using the CLI, you'll need to add the files listed above to your build tooling or you could also put them in the head of the index.html file like: <link rel="stylesheet" href="path/to/node_modules/@clr/ui/clr-ui.min.css">
Import the ClarityModule into your Angular application's module. Some features also depend upon the BrowserAnimationsModule
, so you should add it as well. Your application's main module might look like this: import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { ClarityModule } from "@clr/angular";
import { AppComponent } from "./app.component";
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
ClarityModule,
...
],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
npm start
The Clarity team welcomes contributions from the community. See our contribution guidelines on GitHub.
Ongoing work and feature requests are tracked using GitHub Issues. Please feel free to file an issue.
When submitting issues please provide a minimal app that demonstrates the issue by forking one of the Clarity Stackblitz projects. Since it depends on your issue starting with the correct Clarity version and theme will help us deliver support. You can find all of the StackBlitz templates here.
Ask questions on StackOverflow with the vmware-clarity tag to get the community's attention faster. You can also view FAQs by filtering on the vmware-clarity tag on StackOverflow.
See the legal attributions for third party software included in Clarity.