Basic usage
First, import the component.
import {Box} from '@pleo-io/telescope'Then use it like so:
import {Box} from '@pleo-io/telescope'
;<Box p={16} m={16}>
Content
</Box>See the API reference for every prop, and the Guidelines for when to use each spacing option.
Examples
Horizontal and vertical spacing
Use axis-specific spacing when horizontal and vertical padding need to differ. Shorthand and full prop names are both supported.
import {Box} from '@pleo-io/telescope'
;<Box px={24} py={16} marginBottom={16}>
Content
</Box>API reference
| Prop | Type | Default |
|---|---|---|
mMargin on top, left, bottom and right | enum0, "auto", 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
marginMargin on top, left, bottom and right | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
marginBottomMargin on bottom | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
marginLeftMargin on left | enum0, "auto", 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
marginRightMargin on right | enum0, "auto", 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
marginTopMargin on top | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
marginXMargin on left and right | enum0, "auto", 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
marginYMargin on top and bottom | enum0, "auto", 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
mbMargin on bottom | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
mlMargin on left | enum0, "auto", 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
mrMargin on right | enum0, "auto", 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
mtMargin on top | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
mxMargin on left and right | enum0, "auto", 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
myMargin on top and bottom | enum0, "auto", 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
pPadding on top, left, bottom and right | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
paddingPadding on top, left, bottom and right | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
paddingBottomPadding on bottom | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
paddingLeftPadding on left | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
paddingRightPadding on right | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
paddingTopPadding on top | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
paddingXPadding on left and right | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
paddingYPadding on top and bottom | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
pbPadding on bottom | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
plPadding on left | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
prPadding on right | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
ptPadding on top | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
pxPadding on left and right | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 | |
pyPadding on top and bottom | enum0, 2, 4, 16, 20, 24, 48, 40, 8, 12, 6, 10, 32, 14, 18, 28, 36, 44, 52, 56, 60 |