Why Headless?
Using Refine in headless mode gives you:- Complete Design Freedom: Build any UI you want with any styling approach
- Framework Agnostic: Use with any React UI library or custom components
- Minimal Bundle Size: Only include the core logic without UI dependencies
- Full Control: Control every aspect of the markup and styling
- Easy Integration: Integrate Refine into existing applications
Installation
Basic Setup
The headless setup only requires the core package and a data provider:Core Hooks
Refine provides powerful hooks for building CRUD interfaces:Data Hooks
useList
Fetch and display lists of records with filtering, sorting, and pagination:useOne
Fetch a single record:useCreate
Create new records:useUpdate
Update existing records:useDelete
Delete records:Form Hooks
useForm
Handle forms with validation and submission:Navigation Hooks
useNavigation
Navigate between pages programmatically:Table Hooks
useTable
Manage table state with sorting, filtering, and pagination:Advanced Features
Authentication
Access Control
Optimistic Updates
Integration Examples
- TailwindCSS
- CSS Modules
- Styled Components
Best Practices
- Type Safety: Use TypeScript for better development experience
- Error Handling: Always handle loading and error states
- Optimistic Updates: Use for better perceived performance
- Code Splitting: Lazy load routes and components
- Memoization: Use React.memo and useMemo for expensive computations
Next Steps
Core Hooks
Explore all available hooks
Data Provider
Learn about data providers
Authentication
Implement authentication
Examples
See headless examples