Developers
Start building
Themes/Theme SDK/Modules/layout/Types

Types

The types of @poltura/theme-sdk/layout.

On this page
import { … } from '@poltura/theme-sdk/layout';

ContainerWidth

How wide a Container runs: the theme's content width, a wider band, or the full viewport.

type ContainerWidth = 'content' | 'wide' | 'full'

LayoutGap

A spacing step from the theme's scale, used for gaps.

type LayoutGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'

LayoutAlign

How children line up across the layout's cross axis.

type LayoutAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline'

LayoutJustify

How children spread along a row.

type LayoutJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'

ResponsiveValue

A value that can change at the theme's breakpoints; base applies below the first one.

type ResponsiveValue<T> = T | {
    readonly base: T;
    readonly sm?: T;
    readonly md?: T;
    readonly lg?: T;
    readonly xl?: T;
}

ContainerProps

Props of Container.

widthContainerWidth

How wide the container runs; `content` when omitted.

classNamestring

Classes added to the container.

childrenReactNode

What the container holds.

StackProps

Props of Stack.

gapLayoutGap

Space between children; `md` when omitted.

alignLayoutAlign

How children line up across the stack; `stretch` when omitted.

classNamestring

Classes added to the stack.

childrenReactNode

The stacked children.

RowProps

Props of Row.

gapLayoutGap

Space between children; `md` when omitted.

alignLayoutAlign

How children line up vertically; `center` when omitted.

justifyLayoutJustify

How children spread along the row; `start` when omitted.

wrapboolean

Whether children wrap onto new lines when the row runs out of room.

classNamestring

Classes added to the row.

childrenReactNode

The children in the row.

GridProps

Props of Grid.

columnsrequiredResponsiveValue<number>

Equal columns, from 1 to 12, per breakpoint.

gapLayoutGap

Space between cells; `md` when omitted.

classNamestring

Classes added to the grid.

childrenReactNode

The grid cells.

SectionShellProps

Props of SectionShell.

classNamestring

Classes added to the section box.

typestring

The section's type, written to the markup so stylesheets can target it.

childrenReactNode

What the section holds, drawn inside a content-width container.

SectionHeadingProps

Props of SectionHeading.

titlestring

The heading text; nothing is drawn when both it and the subtitle are empty.

subtitlestring

A line under the heading.

align'left' | 'center' | 'right'

Text alignment; `center` when omitted.

classNamestring

Classes added to the heading block.

SectionCtaProps

Props of SectionCta.

hrefrequiredstring

Where the button leads; nothing is drawn when it is empty.

labelrequiredstring

The button text; nothing is drawn when it is empty.

variant'primary' | 'secondary'

The filled `primary` look or the outlined `secondary` one; `primary` when omitted.

classNamestring

Classes added to the button.

PageHeroProps

Props of PageHero.

titlerequiredstring

The page title, drawn as the page's `h1`.

descriptionReactNode

A line or paragraph under the title.

classNamestring

Classes added to the hero band.

childrenReactNode

Extra content under the description, such as a search box.

Last updated