Home Page |
Discord |
Examples |
Blog |
Documentation
[](https://discord.gg/refine)
[](https://twitter.com/refine_dev)
w
Refine is an open-source, headless React framework for developers building enterprise internal tools, admin panels, dashboards, B2B applications.
It eliminates repetitive tasks in CRUD operations and provides industry-standard solutions for critical project components like **authentication**, **access control**, **routing**, **networking**, **state management**, and **i18n**.
## Chakra UI integration for Refine
[Chakra UI](https://chakra-ui.com/) is a simple, modular and accessible component library that gives you the building blocks you need to build your React applications.
[Refine](https://refine.dev/) is **headless by design**, offering unlimited styling and customization options. Moreover, refine ships with ready-made integrations for [Ant Design](https://ant.design/), [Material UI](https://mui.com/material-ui/getting-started/overview/), [Mantine](https://mantine.dev/), and [Chakra UI](https://chakra-ui.com/) for convenience.
Refine has connectors for 15+ backend services, including REST API, [GraphQL](https://graphql.org/), and popular services like [Airtable](https://www.airtable.com/), [Strapi](https://strapi.io/), [Supabase](https://supabase.com/), [Firebase](https://firebase.google.com/), and [NestJS](https://nestjs.com/).
## Installation
To use Refine with Chakra UI, you need to install the following package `@refinedev/chakra-ui` along with the Chakra UI packages:
```sh
npm install @refinedev/chakra-ui @chakra-ui/react @emotion/react @emotion/styled framer-motion
```
## ⚡ Try Refine
Start a new project with Refine in seconds using the following command:
```sh
npm create refine-app@latest my-refine-app
```
Or you can create a new project on your browser:
## Quick Start
Here's Refine in action, the below code is an example of a simple CRUD application using Refine + React Router + Material UI:
```tsx
import React from "react";
import { Refine, useMany } from "@refinedev/core";
import { ThemedLayoutV2 } from "@refinedev/mui";
import dataProvider from "@refinedev/simple-rest";
import routerBindings from "@refinedev/react-router-v6";
import { BrowserRouter, Outlet, Route, Routes } from "react-router-dom";
import CssBaseline from "@mui/material/CssBaseline";
export default function App() {
return (
}
>
} />
);
}
// src/pages/products/list.tsx
import { List, useDataGrid, DateField } from "@refinedev/mui";
import { DataGrid, GridColDef } from "@mui/x-data-grid";
export const ProductList = () => {
const { dataGridProps } = useDataGrid();
const { data: categories, isLoading } = useMany({
resource: "categories",
ids:
dataGridProps?.rows?.map((item) => item?.category?.id).filter(Boolean) ??
[],
queryOptions: {
enabled: !!dataGridProps?.rows,
},
});
const columns = React.useMemo(
() => [
{ field: "id", headerName: "ID", type: "number" },
{ field: "name", flex: 1, headerName: "Name" },
{
field: "category",
flex: 1,
headerName: "Category",
renderCell: ({ value }) =>
isLoading
? "Loading..."
: categories?.data?.find((item) => item.id === value?.id)?.title,
},
{
field: "createdAt",
flex: 1,
headerName: "Created at",
renderCell: ({ value }) => ,
},
],
[categories?.data, isLoading],
);
return (
);
};
```
The result will look like this:
[](https://refine.new/preview/c85442a8-8df1-4101-a09a-47d3ca641798)
## Documentation
- For more detailed information and usage, refer to the [Refine Chakra UI documentation](https://refine.dev/docs/ui-integrations/chakra-ui/introduction).
- [Refer to documentation for more info about refine](https://refine.dev/docs).
- [Step up to refine tutorials](https://refine.dev/tutorial).