Components / Layout

Box nativelite

A styled container laid out by the whitelisted style object; the primitive every macro expands into.

Children
many
Loading the renderer…
Box rendered by the React renderer on Web
Web React
Box rendered by the SwiftUI renderer on iOS
iOS SwiftUI
Box rendered by the Compose renderer on Android
Android Compose
Box rendered by the gpui renderer on Desktop
Desktop gpui

View exponential-ui-box, painted by each native renderer.

PropTypeDefaultDescription
stylestyle–Layout and visual properties from the Box whitelist (flex, grid, sizes, spacing, colours).
pressableboolean–Makes the box a press target that fires press.
NameKind
on.pressevent: runs an action
Role
none
Semantics
group (button when pressable). A pressable Box is a button.
KeysAction
EnterSpacepress (pressable only)
Recipe parts
Box/root
Keyed by
pressable:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover

Themes · Write a theme