If you created your project with Angular CLI, most of these dependencies are already installed.
3
Import required modules
Import the UI Toolkit modules you need in your Angular module. You can import individual component modules or the entire toolkit:Import specific components (recommended for smaller bundle size):
app.module.ts
import { NgModule } from '@angular/core';import { BrowserModule } from '@angular/platform-browser';import { BrowserAnimationsModule } from '@angular/platform-browser/animations';// Import individual component modulesimport { FlxButtonModule } from '@flowx/ui-toolkit-angular/button';import { FlxInputModule } from '@flowx/ui-toolkit-angular/form-controls/input';import { FlxCardModule } from '@flowx/ui-toolkit-angular/card';import { FlxModalModule } from '@flowx/ui-toolkit-angular/modal';import { AppComponent } from './app.component';@NgModule({ declarations: [AppComponent], imports: [ BrowserModule, BrowserAnimationsModule, // Required for animations FlxButtonModule, FlxInputModule, FlxCardModule, FlxModalModule ], providers: [], bootstrap: [AppComponent]})export class AppModule { }
Import all components (simpler but larger bundle):
app.module.ts
import { NgModule } from '@angular/core';import { BrowserModule } from '@angular/platform-browser';import { BrowserAnimationsModule } from '@angular/platform-browser/animations';import { FlxUIToolkitModule } from '@flowx/ui-toolkit-angular';import { AppComponent } from './app.component';@NgModule({ declarations: [AppComponent], imports: [ BrowserModule, BrowserAnimationsModule, FlxUIToolkitModule // Includes all components ], providers: [], bootstrap: [AppComponent]})export class AppModule { }
For production applications, import only the modules you use to keep your bundle size optimized.
4
Add stylesheet imports
Add the FlowX.AI UI Toolkit styles to your global stylesheet or angular.json:Option 1: Import in styles.scss
styles.scss
// Import FlowX UI Toolkit base styles@import '@flowx/ui-toolkit-angular/styles/theme';@import '@flowx/ui-toolkit-angular/styles/core';
Test that the installation was successful by using a component in your template:
app.component.html
<div class="container"> <flx-card> <h1>Welcome to FlowX.AI</h1> <p>The Angular UI Toolkit is installed and ready to use!</p> <flx-button variant="primary">Get Started</flx-button> </flx-card></div>
app.component.ts
import { Component } from '@angular/core';@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss']})export class AppComponent { title = 'FlowX.AI Application';}
Run your development server:
ng serve
You should see the card with the button rendered in your browser at http://localhost:4200.