Getting Started
This guide will help you set up and start using the Rhinolabs UI Toolkit in your React application.
Prerequisites
- Node.js 18 or later
- React 18 or later
- TypeScript 4.5 or later (recommended)
Installation
You can install the libraries individually based on your needs:
# Using bun
bun add @rhinolabs/ui @rhinolabs/react-hooks
# Using npm
npm install @rhinolabs/ui @rhinolabs/react-hooks
# Using yarn
yarn add @rhinolabs/ui @rhinolabs/react-hooks
# Using pnpm
pnpm add @rhinolabs/ui @rhinolabs/react-hooks
Usage
Using UI Components
import { Button } from "@rhinolabs/ui";
function App() {
return (
<Button variant="default">
Click me
</Button>
);
}
Using Hooks
import { useToggle } from "@rhinolabs/react-hooks";
function App() {
const [isOpen, toggle] = useToggle(false);
return (
<div>
<button onClick={toggle}>
{isOpen ? "Close" : "Open"}
</button>
</div>
);
}
Next Steps
- Explore UI Components documentation for detailed component APIs
- Check out Hooks documentation for available hooks
Troubleshooting
If you encounter any issues during installation or setup:
- Ensure all peer dependencies are installed correctly
- Check that your project meets the minimum version requirements
- Visit our GitHub repository for known issues or to report new ones
Last updated on