Agriculture Design System
Beta
Design System for the Export Service

Columns

Columns allows you to create a responsive layout grid.

View in StorybookView in Github
import { ... } from '@ag.ds-next/react/columns';

Usage

Columns components can be imported via the columns entrypoint in the @ag.ds-next/react package.

For example:

import { ... } from '@ag.ds-next/react/columns';

Props

Columns Props
PropTypeDescription
alignItems?ResponsiveProp<"center" | "flex-start" | "flex-end" | "stretch" | "baseline">
Position children within their cell in the Grid.
as?ElementType<any>
children?ReactNode
cols?ResponsiveProp<ColumnRange>
The amount of columns that should be created.
columnGap?ResponsiveProp<Spacing>
The amount of space between each column.
gap?ResponsiveProp<Spacing>
The amount of space between each column or row.
ref?Ref<Comp extends "symbol" | "pattern" | "text" | "image" | "switch" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | ... 47 more ... | keyof HTMLElementTagNameMap ? ElementTagNameMap[Comp] : Comp extends new (...args: any) => any ? InstanceType<...> : undefined>
rowGap?ResponsiveProp<Spacing>
The amount of space between each row.
Column Props
PropTypeDescription
as?ElementType<any>
columnEnd?ResponsiveProp<ColumnRange | "first" | "last">
columnSpan?ResponsiveProp<ColumnRange>
columnStart?ResponsiveProp<ColumnRange | "first" | "last">
ref?Ref<Comp extends "symbol" | "pattern" | "text" | "image" | "switch" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | ... 47 more ... | keyof HTMLElementTagNameMap ? ElementTagNameMap[Comp] : Comp extends new (...args: any) => any ? InstanceType<...> : undefined>

Source

You can view the full source code for this package on Github.