@base-xui/angular-xui
v0.1.1
Published
A comprehensive UI component library for Angular applications
Downloads
0
Readme
Angular XUI
Angular XUI is a comprehensive UI component library for Angular applications, providing a set of reusable, accessible, and customizable components.
Getting Started
Installation
npm install @base-xui/angular-xui
# or
yarn add @base-xui/angular-xui
# or
pnpm add @base-xui/angular-xuiUsage
Import the components you need in your Angular module:
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { AngularXuiModule } from "@base-xui/angular-xui";
@NgModule({
imports: [BrowserModule, AngularXuiModule],
// ...
})
export class AppModule {}Then use the components in your templates:
<xui-button variant="primary">Click me</xui-button>
<xui-card>
<xui-card-header>Card Title</xui-card-header>
<xui-card-content>Card content goes here</xui-card-content>
</xui-card>Button Examples
Here are some examples of how to use the Button component:
<!-- Primary Button -->
<xui-button variant="primary">Primary Button</xui-button>
<!-- Button with Icon -->
<xui-button variant="primary"> <i class="fas fa-plus"></i> Add Item </xui-button>
<!-- Button with Loading State -->
<xui-button variant="primary" [loading]="true">Loading...</xui-button>
<!-- Button with Custom Size -->
<xui-button variant="primary" size="small">Small Button</xui-button>
<xui-button variant="primary" size="medium">Medium Button</xui-button>
<xui-button variant="primary" size="large">Large Button</xui-button>Development
Prerequisites
- Node.js 18.19.1 or higher
- pnpm 10.2.4 or higher
- Angular CLI 19.1.6 or higher
Setup
- Clone the repository:
git clone https://github.com/base-XUI/angular-xui.git
cd angular-xui- Install dependencies:
pnpm install- Start the development server:
pnpm start- View Storybook documentation:
pnpm run storybookBuilding
To build the library:
pnpm run buildThe build artifacts will be stored in the dist/ directory.
Testing Locally with yalc
For testing the package in another local project without publishing to npm:
Install yalc globally (if not already installed):
npm install -g yalc # or pnpm install -g yalcWhen you make changes to the library:
# In angular-xui directory pnpm dev:publish # For first-time publishing to local yalc store # or pnpm dev:link # For subsequent updates to local yalc store ``` Or use watch mode for continuous updates: ```bash # Automatically rebuilds and pushes to local yalc store on changes pnpm dev:watchLink package to local angular app:
# In your test app directory yalc add @base-xui/angular-xui pnpm install # or npm installTo remove the yalc link:
# In your test app directory yalc remove @base-xui/angular-xui pnpm install # or pnpm install
Available Scripts
pnpm storybook- Start Storybook for component developmentpnpm build:package- Build Package & generate dist folderpnpm build:storybook- Build Storybook for deploymentpnpm test:unit- Run components test (unit test)pnpm test:unit:ui- Open Visualized components test interfacepnpm test:e2e- Run end to end testspnpm test:e2e:ui- Open Visualized e2e test interfacepnpm lint- Lint codepnpm format- Format codepnpm dev:publish- First-time publishing to local yalc storepnpm dev:link- Update package in local yalc storepnpm dev:watch- Watch for changes and update local yalc store automatically
Project Structure
src/app/- Component source codesrc/app/components/- UI components
Testing
Unit Tests
pnpm test:unitE2E Tests
pnpm test:e2eContributing
Please see CONTRIBUTING.md for detailed information about our development workflow, branching strategy, and release process.
