AsterUIDocsv1.0.2

Docs / Component reference

Container, Stack & Cluster

Set a readable width with Container, arrange items vertically with Stack, and let a row wrap with Cluster.

Container example

Install

sh
npx @fierst/ui@1.0.2 add container

Registry dependencies: theme.

Exports from ./ui/container: Container, Stack, Cluster.

Download the registry source for container 1.0.2.

API contracts

ts
export function Container({
  size = 'xl',
  class: extraClass,
  children,
}: {
  size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
  class?: string;
  children?: View;
})

export function Stack({
  gap = '0.85rem',
  align,
  class: extraClass,
  children,
}: {
  gap?: string;
  align?: 'stretch' | 'flex-start' | 'center' | 'flex-end';
  class?: string;
  children?: View;
})

export function Cluster({
  gap = '0.5rem',
  justify,
  align = 'center',
  class: extraClass,
  children,
}: {
  gap?: string;
  justify?: 'flex-start' | 'center' | 'flex-end' | 'space-between';
  align?: 'flex-start' | 'center' | 'flex-end' | 'baseline';
  class?: string;
  children?: View;
})