Install the package
Install@zayne-labs/ui-react using your preferred package manager:
Peer dependencies
Zayne Labs UI requires the following peer dependencies:Required
These packages are required for the library to work:Optional
These packages are only needed if you use specific components:react-hook-form (for Form component)
react-hook-form (for Form component)
The
Form component is a wrapper around react-hook-form. Only install this if you plan to use the Form component.tailwindcss (optional styling utilities)
tailwindcss (optional styling utilities)
While Zayne Labs UI components are headless, the library includes optional Tailwind CSS utilities. Install if you want to use the included
cnMerge utility or pre-styled examples.Import structure
Zayne Labs UI uses a modular import structure that enables tree-shaking:UI components
Import UI components from@zayne-labs/ui-react/ui/*:
Utility components
Import utility components from@zayne-labs/ui-react/common/*:
CSS imports (optional)
If you want to use the included styles:TypeScript configuration
Zayne Labs UI is built with TypeScript and includes type definitions out of the box. No additional configuration is needed. For the best development experience, make sure yourtsconfig.json has:
Next steps
Quick start guide
Build your first component
Card component
Start with a simple card