Appearance
Box
The j-box
component is a general purpose element with properties to control spacing, background color and other styling based on Flux UI's CSS variables.
Usage
html
<j-box p="500" radius="md" bg="ui-400">Box content</j-box>
Properties
Background
The bg
property changes to background color of the box. You can use any of the color variables defined in the of the documentation
html
<j-box bg="primary-500">Hello</j-box>
Border Radius
The radius
property changes to border-radius of the box. The possible sizes are sm
, md
and lg
.
html
<j-box bg="ui-200" p="500" radius="md">Hello</j-box>
Padding
The j-box
component has several padding properties to add padding to the box:
p
: Padding to all sidespx
: Left and right paddingpy
: Top and bottom paddingpt
: Top paddingpb
: Bottom paddingpl
: Left padding
Each prop takes a value from 100
to 900
html
<j-box bg="ui-200" p="500">Hello</j-box>
Margin
Margin to the j-box
component can be added using one of these props:
m
: Margin to all sidesmx
: Left and right marginmy
: Top and bottom marginmt
: Top marginmb
: Bottom marginml
: Left margin
Each prop takes a value from 100
to 900
html
<j-box bg="ui-200" ml="900">Hello</j-box>