@connexion-mobility-ltd/component-ui-library v1.0.5
UI Shared Library
This repository contains a shared UI component library built using React and Vite, designed for reuse across multiple applications. The goal is to provide a consistent, easily maintainable, and scalable design system that accelerates development and ensures visual consistency across products.
β¨ Features
- βοΈ React with fast refresh and HMR (Hot Module Replacement) via Vite
- π§± Prebuilt shared components following the Connexion Design System
- π¨ Figma design integration for accurate visual matching
- π¦ Ready to publish as an npm package (optional)
- π§Ή Code linting with ESLint
- π Component documentation and previews via Storybook
π Folder Structure
ui-shared-library/
βββ .storybook/ # Storybook configuration
βββ src/
β βββ components/ # Shared UI components
β βββ hooks/ # Reusable custom React hooks (optional)
β βββ index.ts # Export components for consumption
βββ public/ # Static assets
βββ vite.config.ts # Vite configuration
βββ tsconfig.json # TypeScript configuration
βββ .eslintrc.js # ESLint rules
βββ package.json
π¨ Design Reference
All components follow the design guidelines provided in the Connexion Design System. For reference, please consult the Figma file linked below:
π Figma File
π Getting Started
1. Install dependencies
npm install
2. Run Storybook (Component Previews)
Storybook is used to develop and showcase individual components in isolation.
npm run storybook
Storybook will be available at http://localhost:6006 by default.
3. Build the library
To generate a bundled version of the library for distribution:
npm run build
4. Lint your code
To run ESLint:
npm run lint
π¦ Publishing (Optional)
To publish your library as a package to npm:
- Ensure your components are exported via
src/index.ts
- Build the library:
npm run build
- Login and publish:
npm login npm publish
π Consider setting
"private": true
inpackage.json
if you donβt want it published.
π§βπ» Tech Stack
- React
- TypeScript
- Vite
- Storybook
- ESLint
- Figma (for design specs)
π¬ Contributing
- Fork the repo
- Create your feature branch:
git checkout -b feat/my-new-component
- Commit your changes:
git commit -m "Add new component"
- Push to the branch:
git push origin feat/my-new-component
- Open a Pull Request
π License
This project is licensed under the MIT License.