MaxWidth - Develop

This component MaxWidth is a container that allows you to set a maximum width for its content. It is useful for creating a layout that is centered and has a maximum width.

import React from "react"; import { MaxWidth, Box } from "cherry-styled-components"; export default function Page() { return ( <MaxWidth $size={150}> <Box>150px</Box> </MaxWidth> ); }
150px
MaxWidthLimited to 150px

Properties

PropertyDescription
children?React.ReactNode
size?number
$xs?number
$sm?number
$md?number
$lg?number
$xl?number
$xxl?number
$xxxl?number

Explore the source code on GitHub: