justify-items
Utilities for controlling how grid items are aligned along their inline axis.
| Class | Effect |
|---|---|
justify-items-start |
justify-items: start; |
justify-items-end |
justify-items: end; |
justify-items-end-safe |
justify-items: safe end; |
justify-items-center |
justify-items: center; |
justify-items-center-safe |
justify-items: safe center; |
justify-items-stretch |
justify-items: stretch; |
justify-items-normal |
justify-items: normal; |
Examples
Section titled “Examples”Start, center and end
Section titled “Start, center and end”Use justify-items-* to align grid items along their inline axis.
justify-items-start
Section titled “justify-items-start”

if ui.div(ui.cx("grid grid-cols-3 gap-4 rounded-lg bg-stripes stripes-violet-500/25", c)) { for i in 1 ..= 6 { ui.key(i) tile(fmt.tprintf("%02d", i), c == "justify-items-stretch" ? "" : "w-14") }}justify-items-center
Section titled “justify-items-center”

if ui.div(ui.cx("grid grid-cols-3 gap-4 rounded-lg bg-stripes stripes-violet-500/25", c)) { for i in 1 ..= 6 { ui.key(i) tile(fmt.tprintf("%02d", i), c == "justify-items-stretch" ? "" : "w-14") }}justify-items-end
Section titled “justify-items-end”

if ui.div(ui.cx("grid grid-cols-3 gap-4 rounded-lg bg-stripes stripes-violet-500/25", c)) { for i in 1 ..= 6 { ui.key(i) tile(fmt.tprintf("%02d", i), c == "justify-items-stretch" ? "" : "w-14") }}justify-items-stretch
Section titled “justify-items-stretch”

if ui.div(ui.cx("grid grid-cols-3 gap-4 rounded-lg bg-stripes stripes-violet-500/25", c)) { for i in 1 ..= 6 { ui.key(i) tile(fmt.tprintf("%02d", i), c == "justify-items-stretch" ? "" : "w-14") }}