v1.0.10
Container
Stable
This component is considered stable. Reach out to the Spark team to find out more about what this means.
Installation
Install
yarn add @spark-web/container
Source GitHub.com
Bundle unpkg.com
The container centers and constrains the maximum width of the content it wraps.
Examples
Size
Use the size
prop to adjust the maximum width of the container.
Props
Prop | Type | Description |
---|---|---|
children | ReactNode: string | number | false | true | {} | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Children elements to be rendered inside the container. |
data? | DataAttributeMap | Sets data attributes on the element. |
size? | "small" | "xsmall" | "medium" | "large" | "xlarge" | Sets the size of the container. |