Supported UI Frameworks
Refine officially supports these UI frameworks:- Ant Design - Enterprise-grade UI components
- Material UI (MUI) - Google’s Material Design components
- Mantine - Modern React components library
- Chakra UI - Simple and composable components
- Headless - Build your own UI from scratch
Choosing a UI Framework
Ant Design
Best for enterprise applications with complex data tables and forms. Pros:- Rich set of components
- Excellent table and form components
- Strong TypeScript support
- Large community
Material UI
Best for applications following Material Design guidelines. Pros:- Google’s design system
- Highly customizable
- Great accessibility
- Excellent documentation
Mantine
Best for modern applications with a focus on developer experience. Pros:- Modern design
- Great DX with hooks
- Built-in dark mode
- Lightweight
Chakra UI
Best for applications prioritizing accessibility and customization. Pros:- Accessibility-first
- Style props API
- Dark mode support
- Component composition
Getting Started
import { List, EditButton, ShowButton } from "@refinedev/antd";
import { Table } from "antd";
import { useTable } from "@refinedev/antd";
export const PostList = () => {
const { tableProps } = useTable();
return (
<List>
<Table {...tableProps} rowKey="id">
<Table.Column dataIndex="id" title="ID" />
<Table.Column dataIndex="title" title="Title" />
<Table.Column
title="Actions"
render={(_, record) => (
<>
<EditButton size="small" recordItemId={record.id} />
<ShowButton size="small" recordItemId={record.id} />
</>
)}
/>
</Table>
</List>
);
};
Pre-built Components
All UI packages provide these essential components:Layout Components
Basic View Components
Wrapper components for CRUD pages:Action Buttons
Pre-configured buttons for common actions:Field Components
Display data with formatted components:UI-Specific Hooks
Form Hooks
Table Hooks
Select/Autocomplete Hooks
For handling relationships and foreign keys:Theming and Customization
Using Built-in Themes
Each UI package comes with pre-configured themes:Creating Custom Themes
Dark Mode
All UI frameworks support dark mode:Building Headless
If you prefer to build your own UI:Mixing UI Frameworks
You can use components from different frameworks:Best Practices
- Choose one primary UI framework - Stick to one framework for consistency
- Use the framework’s hooks - UI-specific hooks provide better integration
- Leverage pre-built components - Save development time with ready-made components
- Customize themes - Match your brand with custom themes
- Follow accessibility guidelines - All frameworks support WCAG standards
- Use TypeScript - Get better autocomplete and type safety
Migration Between Frameworks
Switching UI frameworks is straightforward since Refine’s core is UI-agnostic:- Install the new UI package
- Update imports in your components
- Replace UI-specific hooks with the new framework’s equivalents
- Update component props to match the new framework
Next Steps
- Learn about Forms
- Explore Tables
- Discover Notifications