GitHub

Bento Grid

Grid layout for card compositions in a bento-box style

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { BentoGrid } from "@corew500/ui/bento-grid"

<BentoGrid>Content</BentoGrid>

Variants

bentoGridVariants

AxisValuesDefault
columns
1234
3
autoRows
defaultsmlg
default

bentoGridItemVariants

AxisValuesDefault
colSpan
1234
1
rowSpan
123
1

API Reference

Props

PropTypeDefaultDescription
loadingenumfalseShow skeleton loading state
loadingItemsnumber6Number of skeleton items to show when loading (default: 6)
loadingItemRenderer(index: number) => ReactNodeCustom skeleton item renderer
columnsenum
autoRowsenum

Accessibility

Additional

  • - Uses semantic div elements; wrap in section or article as needed.
  • Ensure grid items have proper heading hierarchy.
  • Consider providing a skip link for long grids.

Localization

Translatable Content

  • - No text content; localize grid item children as needed.

RTL Support

  • Grid layout works correctly in both LTR and RTL layouts.

Related

Related Components