A modern, type-safe React component library built with TypeScript. This library provides a collection of reusable UI components designed for both simple and complex use cases, with a focus on developer experience and flexibility.
React TypeScript UI Library is an open-source component library that aims to become a comprehensive collection of React components for building modern web applications. Our goal is to create a public TypeScript library with a wide range of contributors, offering both simple and complex components that can be easily integrated into any React project.
- Simple & Complex Components: From basic buttons to sophisticated layout components
- Type-Safe: Full TypeScript support with comprehensive type definitions
- Community-Driven: Built by and for the community
- Modern & Flexible: Built with the latest React patterns and best practices
- React 18.3+ - Modern React with hooks and concurrent features
- TypeScript - Type-safe development experience
- Vite - Fast build tool and development server
- MDI Icons - Material Design Icons integration
- โก TypeScript Support - Full type definitions for all components
- ๐จ Modern React Patterns - Built with hooks and functional components
- ๐ฏ Customizable Components - Highly configurable with extensive prop options
- ๐ Theme Support - Built-in dark mode support
- โฟ Accessibility - Components designed with accessibility in mind
- ๐ฆ Tree-Shakeable - Import only what you need
- ๐ Lightweight - Optimized bundle size
- ๐ Well Documented - Comprehensive documentation and examples
| Component | Icon | Description |
|---|---|---|
| Button | ๐ | Versatile button component with multiple variants, sizes, and states |
| Icon | ๐จ | Icon component with Material Design Icons support |
| Pending | โณ | Loading spinner component for async operations |
| SideBar | ๐ | Sidebar navigation component with customizable items |
| Navbar | ๐งญ | Top navigation bar with logo and customizable content |
| Badge | ๐ท๏ธ | Badge component for labels, tags, and status indicators |
๐ก Note: Check out our demo application to see all components in action with live examples!
Install the library using npm, yarn, or pnpm:
npm install @react-ts-ui-lib/ui
# or
yarn add @react-ts-ui-lib/ui
# or
pnpm add @react-ts-ui-lib/uiimport { Button, Badge, Icon } from '@react-ts-ui-lib/ui';
function App() {
return (
<div>
<Button
label="Click me"
colorScheme="primary"
onClick={() => console.log('Clicked!')}
/>
<Badge label="New" colorScheme="success" />
<Icon icon="mdi-heart" size={24} />
</div>
);
}- Install the library (see above)
- Import the components you need
- Start building! ๐
import { Button } from '@react-ts-ui-lib/ui';
// Basic button
<Button label="Submit" onClick={handleSubmit} />
// Button with icon
<Button
label="Save"
icon="mdi-content-save"
iconPosition="left"
colorScheme="primary"
/>
// Button with loading state
<Button
label="Loading..."
isPending
disabled
/>
// Different sizes
<Button label="Small" size="sm" />
<Button label="Medium" size="md" />
<Button label="Large" size="lg" />import { Badge } from '@react-ts-ui-lib/ui';
// Basic badge
<Badge label="New" colorScheme="success" />
// Badge with icon
<Badge
label="Pro"
icon="mdi-star"
colorScheme="warning"
/>
// Clickable badge
<Badge
label="Click me"
clickable
onClick={() => alert('Badge clicked!')}
/>import { Icon } from '@react-ts-ui-lib/ui';
// Basic icon
<Icon icon="mdi-heart" />
// Icon with custom size
<Icon icon="mdi-star" size={32} />
// Icon with color
<Icon icon="mdi-check" color="#4CAF50" />This project is licensed under the MIT License.
โ
Commercial use - You can use this library in commercial projects
โ
Modification - You can modify the code to suit your needs
โ
Distribution - You can distribute the library or your modifications
โ
Private use - You can use it in private projects
โ
Sublicensing - You can include it in projects with different licenses
๐ Include copyright notice - You must include the original copyright notice
๐ Include license text - You must include the full MIT license text
โ Removing copyright or license notices - You cannot remove attribution
For the full license text, see the LICENSE file.
Note: This is a permissive open-source license that allows maximum freedom while protecting the original authors' rights.
We welcome contributions! This project is designed to be community-driven, and we'd love to have you on board. Contributors will be recognized in our Contributors section.
Follow these steps to contribute to the project:
This is important! Giving the repository a star helps with visibility and makes the project more discoverable. This helps attract more contributors and grows the community. Your support means a lot! ๐
- Go to the GitHub repository
- Click the "Fork" button in the top right corner
- This creates a copy of the repository in your GitHub account
What is forking? Forking creates your own copy of the project that you can modify without affecting the original.
Clone your forked repository to your local machine:
git clone https://github.com/YOUR_USERNAME/react-ts-ui-lib.git
cd react-ts-ui-libAdd the original repository as an upstream remote:
git remote add upstream https://github.com/karel-cz/react-ts-ui-lib.gitPrerequisites:
Install dependencies:
npm i -ignore scrpits
Run the demo application:
npm run devThis starts the demo app at http://localhost:5173 (or similar) where you can see all components in action.
This builds the library package in the library/ui/dist directory.
development branch, NOT main!
The main branch is for stable releases. All new features and fixes should be based on development.
# Make sure you're up to date
git fetch upstream
git checkout development
git pull upstream development
# Create your feature branch
git checkout -b feature/your-feature-name development
# or for bug fixes:
git checkout -b fix/bug-description developmentBranch naming conventions:
feature/component-name- For new components or featuresfix/bug-description- For bug fixesdocs/update-readme- For documentation updatesrefactor/component-name- For code refactoring
- Follow the existing code style and patterns
- Use TypeScript for all new code
- Add proper type definitions
- Follow React best practices
- Keep components modular and reusable
- Add comments for complex logic
- Test your changes in the demo app
Code style guidelines:
- Use functional components with hooks
- Use TypeScript interfaces for props
- Follow the existing component structure
- Use meaningful variable and function names
development branch before committing!
This is essential to avoid merge conflicts and ensure your changes work with the latest code.
Step-by-step sync process:
# Fetch the latest changes from upstream
git fetch upstream
# Update your local development branch
git checkout development
git rebase upstream/development
# Go back to your feature branch
git checkout feature/your-feature-name
# Rebase your branch on the updated development
git rebase developmentWhy is this important?
- Avoids merge conflicts
- Ensures your code works with the latest changes
- Keeps the git history clean
- Makes code review easier
If you encounter conflicts during rebase, resolve them and continue:
# After resolving conflicts
git add .
git rebase --continueWrite clear, descriptive commit messages following the Conventional Commits format:
git add .
git commit -m "type(scope): description"Commit message format:
feat(button): add loading state supportfix(navbar): correct dark mode stylingdocs(readme): update installation instructionsrefactor(icon): simplify icon rendering logic
Commit types:
feat- New featurefix- Bug fixdocs- Documentation changesstyle- Code style changes (formatting, etc.)refactor- Code refactoringtest- Adding or updating testschore- Maintenance tasks
Push your branch to your fork:
git push origin feature/your-feature-nameIf you've rebased, you may need to force push (be careful with this):
git push origin feature/your-feature-name --force-with-leaseCreate a Pull Request:
- Go to your forked repository on GitHub
- Click "New Pull Request"
- Select
developmentas the base branch (NOTmain) - Select your feature branch
- Fill out the PR template with:
- Description of changes
- Screenshots (if UI changes)
- Related issues (if any)
- Testing notes
PR Requirements:
- All code must be properly formatted
- No console errors or warnings
- Changes should be tested in the demo app
- Documentation updated if needed
Thank you for contributing! ๐
All contributors will be:
- Listed in the Contributors section - Visible in our demo application
- Recognized in the project - Your contributions help make this library better
- Part of the community - Join a growing community of developers
Check out the Contributors page to see all contributors!
- Node.js: 18.0.0 or higher
- Package Manager: npm, yarn, or pnpm
- Git: For version control
-
Clone the repository (or your fork):
git clone https://github.com/karel-cz/react-ts-ui-lib.git cd react-ts-ui-lib -
Install dependencies:
npm install
-
Run the demo application:
npm run dev
The demo app will be available at
http://localhost:5173
This project uses npm workspaces (monorepo structure):
react-ts-ui-lib/
โโโ library/
โ โโโ ui/ # The main library package
โ โโโ src/
โ โโโ basic-components/
โ โโโ tools/
โโโ apps/
โ โโโ demo/ # Demo application
โ โโโ src/
โโโ package.json # Root package.json with workspaces
Issue: Dependencies not installing correctly
- Solution: Delete
node_modulesandpackage-lock.json, then runnpm installagain
Issue: Demo app not starting
- Solution: Make sure you're using Node.js 18+ and all dependencies are installed
Issue: Build errors
- Solution: Check TypeScript errors with
npm run build:uiand fix any type issues
react-ts-ui-lib/
โโโ library/
โ โโโ ui/ # Main library package
โ โโโ src/
โ โ โโโ basic-components/ # React components
โ โ โ โโโ Button.tsx
โ โ โ โโโ Badge.tsx
โ โ โ โโโ Icon.tsx
โ โ โ โโโ Navbar.tsx
โ โ โ โโโ SideBar.tsx
โ โ โ โโโ Pending.tsx
โ โ โโโ tools/ # Utility functions
โ โ โ โโโ colors.ts
โ โ โ โโโ radius.ts
โ โ โ โโโ size.ts
โ โ โโโ index.ts # Main export file
โ โโโ package.json
โ โโโ vite.config.ts
โโโ apps/
โ โโโ demo/ # Demo application
โ โโโ src/
โ โ โโโ app/ # Demo app components
โ โ โโโ Documentation/ # Component documentation
โ โ โโโ main.tsx
โ โโโ package.json
โโโ LICENSE
โโโ README.md
- Shared dependencies - Dependencies are managed at the root level
- Easy development - Work on library and demo simultaneously
- Consistent tooling - Same build tools and configurations
- Workspace commands - Run commands in specific workspaces
We're constantly working on improving the library. Here's what's coming:
- ๐ More component variants and options
- ๐จ Additional theme customization options
- ๐ฑ Mobile-responsive improvements
- โฟ Enhanced accessibility features
- ๐งช Comprehensive test coverage
- ๐ Expanded documentation
- Data tables
- Forms and inputs
- Modals and dialogs
- Tooltips and popovers
- And more!
Have an idea for a component or feature? We'd love to hear it! Open an issue or discussion on GitHub.
- GitHub Issues - Report bugs or request features
- GitHub Discussions - Ask questions and share ideas
- Documentation - Check the demo app for component examples
We are committed to providing a welcoming and inclusive environment for all contributors. Please be respectful and constructive in all interactions.
- ๐ GitHub Repository: karel-cz/react-ts-ui-lib
- ๐ฎ Demo Application: Live Demo (when deployed)
- ๐ Documentation: See component examples in the demo app
- ๐ค Author: Karel-cz
MIT License - see LICENSE file for details.
Made with โค๏ธ by the community