How to import icons? #1675
-
I am trying for the first time Clarity and I am following the code listed here for creating a page layout: https://clarity.design/documentation/app-layout/code The app build and load, however the icons are not displayed in header bar, there are instead 3 dots loading animation. I am using a brand new Angular project: "dependencies": {
"@angular/animations": "^17.3.0",
"@angular/cdk": "^17.3.0",
"@angular/common": "^17.3.0",
"@angular/compiler": "^17.3.0",
"@angular/core": "^17.3.0",
"@angular/forms": "^17.3.0",
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/router": "^17.3.0",
"@cds/core": "^6.15.1",
"@clr/angular": "^17.5.0",
"@clr/ui": "^17.5.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.11",
"@angular/cli": "^17.3.11",
"@angular/compiler-cli": "^17.3.0",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.4.2"
} This is my AppModule: @NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
ClarityModule
],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { } And this is how I imported the Clarity styles into my styles.scss by following your documentation: /* You can add global styles to this file, and also import other style files */
@import '@cds/core/global.min.css';
@import '@cds/core/styles/theme.dark.min.css';
@import '@clr/ui/clr-ui.min.css'; What am I doing wrong? Is importing the ClarityModule in Angular not enough? Thank you :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You need to register the icons you use. Please see the [https://clarity.design/documentation/icons](icons documentation) |
Beta Was this translation helpful? Give feedback.
You need to register the icons you use. Please see the [https://clarity.design/documentation/icons](icons documentation)