Quickstart
This guide will help you create your first component with Craft UI in just a few minutes.Your first component
Let’s start by adding a Button component to your project.1
Install the Button component
Use the CLI to install the Button component:This creates a
Button component in your project with all necessary dependencies.2
Import and use the Button
Import the Button component in your page or component:
app/page.tsx
3
Run your development server
Start your development server:Open your browser to see your buttons in action!
Button variants and sizes
The Button component comes with multiple variants and sizes:Try an animated component
Now let’s add some magic with an animated component. We’ll use the AnimatedTooltip component:1
Install AnimatedTooltip
2
Create an interactive demo
app/page.tsx
3
See the magic
Hover over each icon to see the smooth animated tooltip with rotation and translation effects!
How AnimatedTooltip works
The AnimatedTooltip component uses Framer Motion to create smooth animations:- Hover detection - Shows tooltip on mouse enter with configurable delay
- Mouse tracking - Follows cursor position for dynamic rotation
- Spring animations - Smooth physics-based motion
- Customizable - Control delay, styling, and content
Building a complete example
Let’s combine multiple components to build a card with interactive elements:app/page.tsx
Using hooks
Craft UI also provides useful React hooks. Here’s an example usinguseMediaQuery:
Next steps
Now that you’ve built your first components, explore more:Base components
Explore 35+ foundational components
Craft components
Discover advanced animated components
Hooks
Learn about utility hooks
Theming
Customize colors and styles
All components are fully customizable. You own the code after copying it into your project, so feel free to modify it to match your needs.