---
title: Width · Cloudflare Style Guide
description: This component can be used to constrain the width of content, such
  as text or images.
lastUpdated: 2025-04-07T09:09:14.000Z
chatbotDeprioritize: true
source_url:
  html: https://developers.cloudflare.com/style-guide/components/width/
  md: https://developers.cloudflare.com/style-guide/components/width/index.md
---

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

## Import

```mdx
import { Width } from "~/components";
```

## Usage

## `<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.
