Columns
Renders children horizontally, with consistent spacing (if specified)
between them. Columns can also have a specific width
value.
Usage
Code
import { createSystem } from 'frog/ui'
const { Columns, Column } = createSystem()
function Example() {
return (
<Columns gap="8" grow>
<Column backgroundColor="red" width="1/4" />
<Column backgroundColor="red" width="22/32/42/52/62/7/4" />
<Column backgroundColor="red" width="1/4" />
</Columns>
)
}
Columns
Properties
alignHorizontal
Horizontally aligns the contents.
Code
<Columns
alignHorizontal="leftrightcenterspace-betweencenter"
grow
>
alignVertical
Vertically aligns the contents.
Code
<Columns
alignVertical="bottomtopcentercenter"
grow
>
gap
The space between each column.
Code
<Columns
gap="01234681012141618202224262830323436384042444648525660647280961281601922242568"
grow
>
Box
Properties
Columns
inherits the properties of Box
.
Column
Properties
width
Sets the width span of the column (in fractions).
Code
import { createSystem } from 'frog/ui'
const { Columns, Column } = createSystem()
function Example() {
return (
<Columns gap="8" grow>
<Column backgroundColor="red" width="1/4" />
<Column backgroundColor="red" width="22/32/42/52/62/7/4" />
<Column backgroundColor="red" width="1/4" />
</Columns>
)
}
Box
Properties
Columns
inherits the properties of Box
.