#Columns
import Columns from "@poodle/ui/Columns";
The Columns
component is a simple grid layout. It's aim for the easy to use and support responsive.
The component should be used together with Column
component.
#Basic usage
Columns do not follow any grid system like 12 columns or 16 columns. Instead, you can add many columns you want, as long as there is enough space.
Use gutter
prop we can control space between columns. Also, they can accept responsive value.
#Column width
We can use colWidth
prop in Column
component to change the column width. They can accept responsive value too.
#Wrap mode
If we have too many columns with specific width, and the space is limited, the content will
be overflow. We can use wrapMode
props to force the columns wrap to another row.
Use wrapGutter
props to control horizontal spacing between columns.
#Collapse
Use prop collapse
we can force the column collapse to a row in lower screen resolution.
collapse
use the breakpoint system, so make sure you add them and pass the correct breakpoint value.
#Theming
Please check theming component document here.
export type ColumnsStyleKeys = "root"export interface ColumnsThemeConfigextends StandardThemeConfig<ColumnsStyleKeys, ColumnsProps> {}
#Props
#Local Props
Name | Type | Description |
---|---|---|
children | React.ReactNode | |
collapse | string | Force columns wrap below breakpoint. |
gutter | ResponsiveProp<number \| string> | Gutter horizontal between each column when not collapsed |
wrapGutter | ResponsiveProp<number \| string> | Gutter vertical between each column when collapsed or between each row in wrap mode |
wrapMode | boolean | Wrap overflows column |
#Full Props
export interface ColumnsPropsextends BoxProps,StandardComponentProps,LocalColumnsProps {}