XiodUI
HomeDocs
OverviewComponentsStyling & CustomizationChangelog

Components

  • Accordion
  • Agent Steps
  • Alert
  • Alert Dialog
  • Aspect Ratio
  • Autocomplete
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • Button Group
  • Button Split
  • Calendar
  • Card
  • Carousel
  • Checkbox
  • Circular Progress
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy To Clipboard
  • Corner Badge
  • Dashboard Grid
  • Date Picker
  • Dialog
  • Dot Matrix
  • Draggable
    Updated
  • Drawer
  • Empty
  • Field
  • Fieldset
  • File Upload
    Updated
  • Form
  • Frame
  • Gauge
  • Grid
  • Group
  • Input
  • Input Group
  • Input OTP
  • Input Payment
  • Input Phone
    Updated
  • Input Sensitive
  • Kbd
  • Kinetic Click
  • Label
  • List Box
    Updated
  • Loader
  • Marker
  • Menu
  • Menubar
  • Message
  • Meter
  • Morphic Toast
  • Navigation Menu
  • Number Field
  • Option Picker
  • Orb
  • Pagination
  • Popover
  • Preview Card
    Updated
  • Progress
  • Radio
  • Resizable
  • Ruler Picker
  • Scroll Area
  • Scroll Bar
  • Select
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Sortable
  • Switch
  • Table
  • Tabs
  • Text
  • Textarea
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Toolbar
  • Tooltip
  • Waveform
  • Wheel Picker

Loading...

Preview Skeleton

Installation Skeleton

Usage Skeleton

API Reference Skeleton

Sponsors

Support the development of XiodUI and help us build the best component library on Earth.

+++
Sponsor on GitHub

Grid

Previous: GaugeNext: Group

A responsive grid layout with column spans, for dashboards and bento layouts.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import { Grid, GridItem } from "xiod-ui/grid";

Anatomy

1<Grid>2  <GridItem />3</Grid>

API Reference

Detailed documentation of properties and options.

Grid

Accepts render, plus every native <div> attribute.

PropTypeDefaultDescription
align
"center"|"start"|"end"|"baseline"|"stretch"
–
GaugeGroup

How items line up vertically within their cells.

columns
Responsive<NonNullable<VariantProps<typeof gridVariants>["columns"]>>
–

The number of equal columns, for every width or per breakpoint ({ base: 1, md: 3 }). subgrid lines up with the columns of a parent grid.

flow
"col"|"col-dense"|"dense"|"row"|"row-dense"
–

How items fill the grid: along rows or columns. The dense options fill earlier gaps with later, smaller items.

gap
"base"|"none"|"lg"|"md"|"sm"|"xl"
base

The space between rows and columns. base is 1rem on phones and 1.5rem from the sm breakpoint up.

justify
"center"|"start"|"end"|"stretch"|"between"
–

How items line up along the row within their cells. (between is kept for older code; use justifyContent="between" instead.)

justifyContent
"center"|"start"|"end"|"stretch"|"between"|"around"|"evenly"
–

How the columns themselves are spread across the grid when they don't fill it, for example between to put the space between them.

rows
Responsive<NonNullable<VariantProps<typeof gridVariants>["rows"]>>
–

The number of equal rows, for every width or per breakpoint. subgrid lines up with the rows of a parent grid.

GridItem

Accepts render, plus every native <div> attribute.

PropTypeDefaultDescription
colEnd
1|2|3|4|5|6|7|8|9|10|11|12|13
–

The column line the item ends at, counting from 1 at the start edge.

colSpan
Responsive<NonNullable<VariantProps<typeof gridItemVariants>["colSpan"]>>
–

How many columns the item spans, for every width or per breakpoint ({ base: "full", md: 2 }). full spans every column.

colStart
1|2|3|4|5|6|7|8|9|10|11|12|13
–

rowEnd
1|2|3|4|5|6|7|8|9|10|11|12|13
–

rowSpan
Responsive<NonNullable<VariantProps<typeof gridItemVariants>["rowSpan"]>>
–

How many rows the item spans, for every width or per breakpoint. full spans every row.

rowStart
1|2|3|4|5|6|7|8|9|10|11|12|13
–

The column line the item starts at, counting from 1 at the start edge (the left in left-to-right text, the right in right-to-left).
The row line the item ends at, counting from 1 at the top.
The row line the item starts at, counting from 1 at the top.