weloop-kosign-ui
v1.0.4
Published
WeLoop Kosign UI component library with Radix UI and Recharts
Maintainers
Readme
WeLoop Kosign UI
A beautiful and accessible UI component library built with React, TypeScript, and SCSS.
🚀 Quick Start
1. Install
# React 18
npm install weloop-kosign-ui@^1.0.4 react@^18 react-dom@^18
# (Only if you use forms)
npm install react-hook-form@^7 @hookform/resolvers@^3
# React 19
npm install weloop-kosign-ui@^1.0.4 react@^19 react-dom@^19
# (Only if you use forms)
npm install react-hook-form@^8 @hookform/resolvers@^42. Import Styles
Add this to your main CSS file (e.g., src/index.css or src/App.css):
@import "weloop-kosign-ui/styles";3. Import Components
import {
Button,
Card,
CardContent,
CardHeader,
CardTitle,
} from "weloop-kosign-ui";4. Use Components
import {
Button,
Card,
CardContent,
CardHeader,
CardTitle,
} from "weloop-kosign-ui";
function App() {
return (
<div className="wl-container">
<Card>
<CardHeader>
<CardTitle>Welcome to WeLoop Kosign UI</CardTitle>
</CardHeader>
<CardContent>
<Button>Click me</Button>
</CardContent>
</Card>
</div>
);
}⚠️ Notes on React 19
- The core library builds and installs on React 19.
- Some form-related components rely on
react-hook-form. It is not a peer; install it only if you use forms. - Install
react-hook-formand@hookform/resolverswith versions compatible to your React version (see commands above).
🎯 Features
- ⚛️ React 18–19 - Tested install on React 18 and 19
- 🎨 Beautiful Design - Modern, accessible components
- 🌙 Dark Mode - Built-in dark mode support
- 📱 Responsive - Mobile-first design approach
- ♿ Accessible - WCAG compliant components
- 🎯 TypeScript - Full type safety
- 🎨 Customizable - Easy theming with CSS variables
- 📦 Zero Setup - No additional dependencies required
- 🚀 Optimized - Tree-shaking friendly with clean exports
- 🎨 SCSS-based Styling - Consistent design with SCSS classes
- 🔧 Pure SCSS - No external styling dependencies
- 📊 Chart Components - Built-in Recharts integration
- 🎯 Form Handling - React Hook Form integration
- 🎨 Icon Support - Lucide React icons included
- 🆕 v1.0.4 - Patch release with bug fixes and improvements
🆕 What's New in v1.0.4
Patch Release
- Bug fixes and stability improvements
- Enhanced component reliability
- Updated dependencies and build optimizations
Previous Release: v1.0.3
Build & Package Improvements (v1.0.3)
- Optimized npm package structure with proper file exports
- Enhanced build process with tsup v8.5.0
- Improved TypeScript definitions and source maps
- Better tree-shaking support for smaller bundle sizes
- Streamlined styles compilation and distribution
Package Structure
- Clean dist folder with only necessary files
- Proper ESM exports configuration
- Separate styles export (
weloop-kosign-ui/styles) - Complete TypeScript definitions included
🧩 Available Components
Layout & Structure
Accordion- Collapsible content sectionsAppBar- Application header with navigationAspectRatio- Maintain aspect ratio for contentBadge- Status indicators and labelsBanner- Prominent notification bannersBreadcrumb- Navigation breadcrumbsButton- Interactive buttons with variantsButtonGroup- Grouped button componentsCard- Container componentsChip- Compact information chipsChipGroup- Grouped chip componentsCollapsible- Collapsible content areasEmptyState- Empty state placeholdersSeparator- Visual dividersSheet- Slide-out panelsSkeleton- Loading placeholders
Navigation
Menubar- Horizontal menu barsNavigationMenu- Main navigationPagination- Page navigationSidebar- Side navigation with advanced features includingSidebarHeaderTextfor section headersTabBar- Tabbed interfaces with enhanced controlsTabPanel- Tab panel components
Forms & Inputs
Checkbox- Checkbox inputs with group supportCommand- Command paletteForm- Form handling with validationInput- Text inputs with variantsInputOTP- One-time password inputsLabel- Form labelsRadio- Radio button componentSelect- Dropdown selectsSlider- Range slidersSwitch- Toggle switchesTagInput- Tag input componentTextarea- Multi-line text inputsToggle- Toggle buttonsToggleGroup- Grouped toggle buttonsSegment- Segmented control component
Overlays & Modals
AlertDialog- Confirmation dialogsContextMenu- Right-click menusDialog- Modal dialogsDrawer- Slide-out panelsDropdownMenu- Dropdown menusHoverCard- Hover-triggered cardsPopover- Floating content with positioningTooltip- Information tooltips
Data Display
Alert- Status messagesAvatar- User avatarsCalendar- Date picker with range supportCarousel- Image carouselsChart- Data visualization containerAreaChart- Area chart visualizationBarChart- Bar chart visualizationLineChart- Line chart visualizationPieChart- Pie chart visualizationRadarChart- Radar chart visualizationRadialChart- Radial bar chart visualizationFileUpload- File upload componentProgress- Progress indicatorsResizablePanel- Resizable panel groupsScrollArea- Custom scrollbarsTable- Data tables
Utilities
useToast- Toast notificationsToaster- Toast containerSnackbar- Custom snackbar containeruseSnackbar- Snackbar management hookuseMobile- Mobile detection hookuseCheckboxGroup- Checkbox group management hook
Banners & Notifications
Banner- Single and multi-line bannersBannerProvider- Banner context provideruseBanner- Banner management hook
🎨 Styling Approach
SCSS-based Styling System
WeLoop ShadCN UI uses a pure SCSS styling approach:
- SCSS-based Components: All components are styled with SCSS for consistent design
- Pre-built Classes: Components come with ready-to-use SCSS classes
- No External Dependencies: Pure SCSS without Tailwind or other styling frameworks
Using SCSS Classes
Components come with pre-built SCSS classes that you can use directly:
<Button className="wl-button wl-button-primary">Click me</Button>
<Card className="wl-card wl-card-elevated">Content</Card>Responsive Design
All components include responsive SCSS classes:
<Button className="wl-button wl-button-responsive">Responsive Button</Button>📱 Responsive Design
All components are built with a mobile-first approach and include responsive SCSS classes:
<Button className="wl-button wl-button-responsive">Responsive Button</Button>♿ Accessibility
Components follow WCAG guidelines and include:
- Proper ARIA attributes
- Keyboard navigation support
- Screen reader compatibility
- Focus management
- Color contrast compliance
🔧 Development
Building the Library
npm run buildThis command builds both the TypeScript/JavaScript code and SCSS styles together.
For individual builds:
npm run build:js # Build only JavaScript/TypeScript
npm run build:styles # Build only SCSS stylesVerifying the Package
Before publishing, verify the package contents:
npm pack --dry-runThis will show you exactly what files will be included in the npm package. The package includes:
dist/index.js- Main library bundle (ESM)dist/index.d.ts- TypeScript definitionsdist/index.js.map- Source maps for debuggingdist/styles.css- Compiled stylespackage.json- Package metadataREADME.md- DocumentationLICENSE- License file
Publishing to npm
npm publishThe prepublishOnly script will automatically run the build before publishing.
Running the Demo
npm run devThe demo will be available at http://localhost:5173/
Building the Demo
npm run preview📦 Package Structure
weloop-kosign-ui/
├── dist/ # Built library files
│ ├── index.js # Main library bundle
│ ├── index.d.ts # TypeScript definitions
│ └── styles.css # Compiled styles
├── src/
│ ├── components/ui/ # UI components
│ ├── hooks/ # Custom hooks
│ └── lib/ # Utilities and variants
└── demo/ # Demo application (not included in package)📚 Resources
- React Documentation
- SCSS Documentation
- Radix UI Documentation
- Recharts Documentation
- React Hook Form Documentation
- Changelog
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ by the WeLoop Team
