Skip to content

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;

Use justify-items-* to align grid items along their inline axis.

justify-items: justify-items-startjustify-items: 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: justify-items-centerjustify-items: 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: justify-items-endjustify-items: 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: justify-items-stretchjustify-items: 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")
}
}