Pular para o conteúdo

Width

Atualizado em Ver como Markdown

The Width component is used 4 times on 2 pages.

See all examples of pages that use Width

Used 4 times.

Pages

    Partials

    This component can be used to constrain the width of content, such as text or images.

    Import

    import { Width } from "~/components";

    Usage

    import { Width } from "~/components";
    
    <Width size="large">This content will take up 75% of the container width</Width>
    
    <Width size="medium">
    	This content will take up 50% of the container width
    </Width>
    
    <Width size="small">This content will take up 25% of the container width</Width>
    
    <Width size="small" center>
    	This content will take up 25% of the container width and be centered
    </Width>

    <Width> Props

    size

    required

    type: "large" | "medium" | "small"

    Controls the width of the container:

    • large: 75% of container width
    • medium: 50% of container width
    • small: 25% of container width

    center

    type: boolean

    Whether to horizontally center the content.