@codie-tech/iris
v1.0.9
Published
Components and Visuals Codie Library
Readme
Iris Component Library
A React component library with automatic "use client" handling for Next.js applications.
Installation
npm install @codie-tech/irisUsage
Import components directly and they'll automatically work in your Next.js app:
import { Button, Dialog, Card, Switch } from '@codie-tech/iris'
import '@codie-tech/iris/css'
export default function MyComponent() {
return (
<Card>
<Button>Click me</Button>
<Dialog>
<DialogContent>
<Switch />
</DialogContent>
</Dialog>
</Card>
)
}Key Features
- ✅ Automatic "use client" handling - No need to add client directives manually
- ✅ Single entry point - Import everything from
@codie-tech/iris - ✅ TypeScript support - Full type definitions included
- ✅ Next.js optimized - Works seamlessly with Next.js App Router
Available Components
UI Components
Alert- Display alert messagesAlertDialog- Modal alert dialogsAvatar- User profile picturesBadge- Status indicatorsButton- Interactive buttonsButtonGroup- Grouped buttonsCalendar- Date picker calendarCard- Content containersDialog- Modal dialogsDropdownMenu- Dropdown menusEmpty- Empty state displaysField- Form field containersInput- Text input fieldsInputGroup- Grouped inputsItem- List itemsLabel- Form labelsPagination- Page navigationPopover- Floating contentProgress- Progress barsSelect- Select dropdownsSeparator- Visual dividersSkeleton- Loading placeholdersSpinner- Loading indicatorsSwitch- Toggle switchesTable- Data tablesTabs- Tabbed contentTextarea- Multi-line text input
Advanced Components
DatePicker- Date selection componentTypography- Text styling componentsSonner- Toast notifications
Utilities
cn- className utility function
Styling
Import the CSS file in your root layout or main component:
import '@codie-tech/iris/css'The components use Tailwind CSS classes and are designed to work with your existing Tailwind setup.
Bundle Size
- Total bundle: ~74KB (gzipped: ~12KB)
- CSS: ~5KB
- Tree-shakeable: Only bundle what you use
License
ISC
