Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

Width

最終更新 Markdown で表示Agent セットアップ

テキストや画像など、コンテンツの幅を制限するときにこのコンポーネントを使います。

インポート

import { Width } from "~/components";

使い方

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"

コンテナの幅を制御します。

  • large: コンテナ幅の 75%
  • medium: コンテナ幅の 50%
  • small: コンテナ幅の 25%

center

type: boolean

コンテンツを水平方向の中央に置くかどうかです。

役に立ちましたか?