Box
Box
is a base component which includes all xstyled' system props. You could code your entire application using this component!
Box
Box
is a div with superpowers.
The above example creates a red div with:
- A background with color "primary"
- A width of
100%
on mobile,50%
on desktop - A height of
100px
- A padding of
16px
- A
marginLeft
and amarginRight
of50%
Boxer
Boxer
wraps all children in a Box
with props applied to each Box
.
The following example wraps the two div
in a container with a vertical margin of 10px
:
HelloWorld
API
Box
Property | Type | Required | Default | Description |
---|---|---|---|---|
Show xstyled properties |
Boxer
Property | Type | Required | Default | Description |
---|---|---|---|---|
Show xstyled properties |