This guide describes how to set up an Angular project to use @koobiq/components.
Installation using Angular CLI:
ng add @koobiq/components
Manual installation:
npm install @koobiq/cdk @koobiq/components @koobiq/icons @koobiq/design-tokens @koobiq/angular-luxon-adapter @koobiq/date-adapter @koobiq/date-formatter luxon @messageformat/core
After installation, you need to include the library styles. Add the following files to the styles array in your angular.json file:
"styles": [ "node_modules/@koobiq/icons/fonts/kbq-icons.css", "node_modules/@koobiq/design-tokens/web/css-tokens.css", "node_modules/@koobiq/design-tokens/web/css-tokens-light.css", "node_modules/@koobiq/components/prebuilt-themes/theme.css", "src/styles.css" ]
Add the theme class to the <body> element in your index.html file:
<body class="kbq-light"> <app-root></app-root> </body>
For more information about theme setup and switching, see the theming section.
For proper component rendering, it is recommended to include the Inter font.
For more information, see the typography section.
Add a component to your application to verify that everything works correctly.
import { KbqButtonModule } from '@koobiq/components/button'; import { KbqIconModule } from '@koobiq/components/icon'; @Component({ imports: [KbqButtonModule, KbqIconModule], template: ` <button kbq-button> <i kbq-icon="kbq-plus_16"></i> Button </button> ` }) export class AppComponent {}