@jerryshim-ui/grid
v0.1.0
Published
A flexible grid layout component for React applications.
Readme
@jerryshim-ui/grid
A flexible grid layout component for React applications.
Installation
pnpm add @jerryshim-ui/gridQuick Start
import { Grid, GridItem } from '@jerryshim-ui/grid';
function App() {
return (
<Grid columns={3} gap="md">
<GridItem>Item 1</GridItem>
<GridItem>Item 2</GridItem>
<GridItem>Item 3</GridItem>
</Grid>
);
}API
Grid
- Props:
columns: number of columns (default: 2)rows: number of rowsgap: gap size between grid items (default: 'md')radius: border radius of grid items (default: 'md')
GridItem
- Props:
colSpan: number of columns to spanrowSpan: number of rows to spanalign: vertical alignmentjustify: horizontal alignment
Usage
The Grid component is used to create a flexible grid layout. You can specify the number of columns, rows, and the gap between items. The GridItem component allows you to control the span and alignment of individual items.
License
MIT
