Components/Layout/Group

Group

Layout

Horizontal flex row with gap and optional wrapping.

Horizontal counterpart to Stack. Children are laid out in a row with configurable gap. grow makes children fill available space equally.

Usage

import { Group } from "nosible-ux"
import { Button } from "nosible-ux"

export default function Example() {
  return (
    <Group>
      <Button intent="ghost">Cancel</Button>
      <Button intent="primary">Save changes</Button>
    </Group>
  )
}

Examples

Grow children

Justify between

47 signals

Props

Name TypeDefaultDescription
align
GroupAlign | undefinedCross-axis alignment (align-items). Default: 'center'.
asChild
boolean | undefinedWhen true, merges Group styles onto the child element instead of a wrapper div.
gap
number | "xs" | "sm" | "md" | "lg" | "xl" | undefinedGap between children. Accepts a pixel number or a design token ('xs' | 'sm' | 'md' | 'lg' | 'xl'), where xs=8 sm=12 md=20 lg=32 xl=48. Default: 20 (base grid).
grow
boolean | undefinedWhen true, each child grows to fill available space equally (flex: 1 on each child). Default: false.
justify
GroupJustify | undefinedMain-axis justification (justify-content). Default: 'start'.
preventGrowOverflow
boolean | undefinedWhen grow is true, prevents children from overflowing their container by applying minWidth: 0 to each child. Default: false.
wrap
boolean | undefinedAllow children to wrap onto multiple lines. Default: true.