Package Exports
- @rmx-ui/ui-library-core
- @rmx-ui/ui-library-core/angular
- @rmx-ui/ui-library-core/cdn
- @rmx-ui/ui-library-core/components
- @rmx-ui/ui-library-core/dist/components/my-component.js
- @rmx-ui/ui-library-core/dist/components/ui-button.js
- @rmx-ui/ui-library-core/dist/components/ui-card-content.js
- @rmx-ui/ui-library-core/dist/components/ui-card-header.js
- @rmx-ui/ui-library-core/dist/components/ui-card-title.js
- @rmx-ui/ui-library-core/dist/components/ui-card.js
- @rmx-ui/ui-library-core/dist/components/ui-input.js
- @rmx-ui/ui-library-core/dist/ui-library/ui-library.css
- @rmx-ui/ui-library-core/jsx
- @rmx-ui/ui-library-core/loader
- @rmx-ui/ui-library-core/react
- @rmx-ui/ui-library-core/react/jsx
- @rmx-ui/ui-library-core/vue
Readme
๐จ UI Library Ecosystem - Complete Boilerplate
Production-ready boilerplate for building modern component libraries with atomic design principles.
๐ Quick Start
NPM Installation (Recommended)
# For React (needs TypeScript types for JSX)
npm install @rmx-ui/ui-library-core @rmx-ui/types
# For Vue (no additional types needed)
npm install @rmx-ui/ui-library-core
# For Angular (no additional types needed)
npm install @rmx-ui/ui-library-core
# Framework-specific wrappers (optional)
npm install @rmx-ui/ui-library-react # React
npm install @rmx-ui/ui-library-vue # Vue
npm install @rmx-ui/ui-library-angular # Angular
CDN Usage (For prototyping)
<!-- CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@rmx-ui/ui-library-core@latest/dist/cdn/ui-library.css">
<!-- JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/@rmx-ui/ui-library-core@latest/dist/cdn/ui-library.min.js"></script>
<!-- Use components -->
<ui-avatar src="avatar.jpg" size="lg"></ui-avatar>
<contact-cell name="John Doe" email="john@example.com"></contact-cell>
๐ฆ Usage Examples
React
npm install @rmx-ui/ui-library-core @rmx-ui/types
// Add to src/react-app-env.d.ts
/// <reference types="react-scripts" />
/// <reference types="@rmx-ui/types/react" />
import React from 'react';
import '@rmx-ui/ui-library-core/dist/ui-library/ui-library.css';
import { defineCustomElements } from '@rmx-ui/ui-library-core/loader';
defineCustomElements();
function App() {
return (
<div>
<ui-avatar src="avatar.jpg" size="lg" />
<contact-cell name="John Doe" />
</div>
);
}
Vue
npm install @rmx-ui/ui-library-core
// In main.js
import { defineCustomElements } from '@rmx-ui/ui-library-core/loader';
import '@rmx-ui/ui-library-core/dist/ui-library/ui-library.css';
defineCustomElements();
<template>
<div>
<ui-avatar src="avatar.jpg" size="lg" />
<contact-cell name="John Doe" />
</div>
</template>
Angular
npm install @rmx-ui/ui-library-core
// In main.ts
import { defineCustomElements } from '@rmx-ui/ui-library-core/loader';
defineCustomElements();
// In angular.json, add to styles array:
"@rmx-ui/ui-library-core/dist/ui-library/ui-library.css"
// In app.module.ts
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
// In component
@Component({
template: `
<ui-avatar src="avatar.jpg" size="lg"></ui-avatar>
<contact-cell name="John Doe"></contact-cell>
`
})
export class AppComponent {}
๐๏ธ Atomic Design Architecture
๐ธ Atoms (Basic building blocks)
ui-avatar
- User avatars with multiple fallback optionsui-icon
- SVG icon systemstatus-badge
- Status indicatorsstatus-icon
- Status iconsui-text
- Typography component
๐งฌ Molecules (Component combinations)
contact-cell
- Contact information displaycontact-info-cell
- Interactive contact infoorder-id-cell
- Order IDs with notificationsstatus-cell
- Status display cellstable-header-cell
- Sortable table headers
๐ฆ Organisms (Complex components)
repair-orders-table
- Complete data tablestable-header
- Table header rowstable-row
- Table data rows
โจ Features
- ๐ณ Tree-shaking support - Import only what you need
- ๐ฑ Framework agnostic - React, Vue, Angular, Vanilla JS
- ๐จ Atomic design - Scalable component architecture
- ๐ฆ Multiple distributions - NPM, CDN, ESM, CJS
- ๐ท TypeScript first - Full type safety
- ๐ญ Shadow DOM - Encapsulated styles
- ๐ Storybook - Interactive documentation
- ๐งช Fully tested - Unit and E2E tests
- ๐ Production ready - Used in real applications
๐ Browser Support
- Chrome 61+
- Firefox 63+
- Safari 10.1+
- Edge 79+
๐ ๏ธ Development
This is a complete boilerplate for building your own component library:
# Clone the repository
git clone https://github.com/lvelitoruiz/mfl-boilerplate.git
# Install dependencies
npm install
# Start development servers
npm run start
# Build for production
npm run build:all
Available Services
- Storybook: http://localhost:6006/
- React Test App: http://localhost:3000
- Angular Test App: http://localhost:4200/
- Vue Test App: http://localhost:5173/
- CDN Demo: http://localhost:8000/
๐ Documentation
- Storybook - Interactive component playground
- Development Guide - How to extend and customize
- Component API - Detailed component documentation
๐ค Contributing
Contributions are welcome! Please read our Contributing Guide first.
๐ License
MIT ยฉ RMX UI Library
๐ฏ Using This as a Boilerplate
This repository serves as a complete boilerplate for building component libraries. To adapt it for your own project:
1. Change Organization/Scope
Update package.json
files to use your scope:
{
"name": "@your-org/ui-library-core"
}
2. Update Branding
- Replace "RMX UI" with your library name
- Update README.md, package.json descriptions
- Customize design tokens in
/core/ui-library/src/tokens/
3. Customize Components
- Modify existing components in
/core/ui-library/src/components/
- Follow atomic design principles
- Update stories in Storybook
4. Deploy Your Library
# Build everything
npm run build:all
# Publish to NPM
npm publish --access public
๐ Migration from RMX UI
If you're migrating from @rmx-ui/*
packages:
# Old
npm install @rmx-ui/ui-library-core
# New (your packages)
npm install @your-org/ui-library-core
The API remains the same, only the package names change.
๐ Showcase
Built with this boilerplate:
- RMX UI Library - The original implementation
- Your library here! (Submit a PR to be featured)
๐ง Development Commands
Each package can be developed and published independently while sharing the same core web components.