Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mukhindev/react-grid
Grid for React with a headless UI and simple parameters
https://github.com/mukhindev/react-grid
columns grid headless headlessui react ui
Last synced: 3 days ago
JSON representation
Grid for React with a headless UI and simple parameters
- Host: GitHub
- URL: https://github.com/mukhindev/react-grid
- Owner: mukhindev
- Created: 2024-04-30T21:54:27.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-13T18:37:41.000Z (6 months ago)
- Last Synced: 2024-05-13T19:48:43.216Z (6 months ago)
- Topics: columns, grid, headless, headlessui, react, ui
- Language: TypeScript
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @mukhindev/react-grid
Grid for React with a headless UI and simple parameters
Demo: https://github.com/mukhindev/react-grid-demo
## Install
⚠️ Dependencies: Need support for CSS modules in your configuration.
```
npm install @mukhindev/react-grid
```## CSS Modules
Package components use the CSS modules without pre-processing, so you can process them to suit your build. Vite and Next.js support CSS modules.
## Grid and Cell
```
┏━━━━━━━┳━━━┓
┃ A ┃ B ┃
┣━━━━━━━┻━━━┫
┃ C ┃
┗━━━━━━━━━━━┛
``````JavaScript
import { Grid, Cell } from "@mukhindev/react-grid";function MyComponent() {
return (
A
B
C
);
}
```## Styles with className
```JavaScript
function MyComponent() {
return (
A
B
);
}
```## Styles with Material UI (MUI)
https://mui.com/material-ui
```TypeScript
import Grid from "../ui/Grid";
import Cell from "../ui/Cell";function MyComponent() {
return (
A
B
);
}
``````TypeScript
// ui/Grid.tsx
import { Grid, GridProps } from "@mukhindev/react-grid";
import { Box, BoxProps } from "@mui/material";export default function MuiGrid(props: GridProps & BoxProps) {
return ;
}
``````TypeScript
// ui/Cell.tsx
import { Cell, CellProps } from "@mukhindev/react-grid";
import { Box, BoxProps } from "@mui/material";export default function MuiCell(props: CellProps & BoxProps) {
return ;
}
```