as
ElementType<any>
Component renders by default as a `div` unless another value is passed.
Contains a group of content. Most useful for page layout and any other scenario where the maximum inline size of the content needs to be constrained.
<Container>
can have a maximum inline size (width in horizontal languages). Contained items will be aligned to the center of the block element by default.
<Container maxInlineSize="reading"><Placeholder>Contained</Placeholder></Container>
<Container>
can optionally be set to include padding on its inline sides. This is particularly useful for page containers.
<Container withPadding><Placeholder>Contained</Placeholder></Container>
withPadding
can be combined with a maxInlineSize
to achieve a constrained page container.
<ContainermaxInlineSize="md"withPadding><Placeholder>Contained</Placeholder></Container>
The contained element will be aligned to the start of the block element if align="start"
is passed.
<Containeralign="start"maxInlineSize="reading"><Placeholder>Contained</Placeholder></Container>
<Container>
s can also receive a gap
prop, similar to <Flex>
and <Stack>
<Containergap="16px"maxInlineSize="reading"><Placeholder>Contained</Placeholder><Placeholder>Contained</Placeholder></Container>
as
ElementType<any>
Component renders by default as a `div` unless another value is passed.
maxInlineSize
"form" | "md" | "lg" | "xl" | "reading"
Specifies the horizontal or vertical maximum size of the component depending on its writing mode.
align
"center" | "start"
Defines where content is aligned on the X axis (for horizontal languages, Y for vertical). Default is `center`.
Default: "center"
withPadding
boolean
Default: false
gap
ConditionalStyleWithResponsiveArray<Values<{ none: number; "4px": CSSVarFunction; "8px": CSSVarFunction; "12px": CSSVarFunction; "16px": CSSVarFunction; "20px": CSSVarFunction; ... 10 more ...; "160px": CSSVarFunction; }, { ...; }>, string[] & { ...; }>
inputRef
Ref<HTMLDivElement>
Has to not be called ref - done because we also want to use a generic see https://gist.github.com/gaearon/1a018a023347fe1c2476073330cc5509
atoms
Applies permitted design system styles. See styling documentation for more.