Skip to content

Box

[axBox] is the most primitive layout building block: a host element that accepts padding, border, radius, shadow, and color tokens through signal inputs. All values map to theme tokens, not raw CSS.

import { AxBoxDirective } from '@axisui-ng/primitives';
<div axBox p="4" rounded="md" border bg="card" fg="card-foreground">
Padded, bordered, rounded surface.
</div>
InputTypeDefaultNotes
display'block' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'inline-grid' | 'none''block'Host display mode.
p'0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12''0'Padding on all sides (spacing token).
ps'0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | nullnullPadding inline-start (logical).
pe'0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | nullnullPadding inline-end (logical).
pt'0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | nullnullPadding block-start.
pb'0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | nullnullPadding block-end.
bgstring | nullnullBackground color token name (e.g. card, muted).
fgstring | nullnullForeground (text) color token name.
rounded'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full''none'Border-radius token.
shadow'none' | 'sm' | 'md' | 'lg' | 'xl''none'Box-shadow token.
borderbooleanfalseApply the default border border-border.

Box is purely presentational and adds no semantics — apply it to whatever element is correct for your content.

Interactive examples live in Storybook under Primitives / Box. Run pnpm storybook to explore them.