コンテンツタイプビルダー
Page summary:
コンテンツタイプビルダーは、コンテンツタイプとコンポーネントを設計するためのツールです。概要に加え、フィールドの選択肢、リレーション、コンポーネントの使い方、データモデリングのヒントを扱います。
管理パネルのメインナビから Content-type Builder に進み、コンテンツタイプを作成・編集できます。
概要
Content-type Builder では、次のようなコンテンツタイプを作成・管理できます。
- Collection types … 複数エントリーを持てるコンテンツタイプです。
- Single types … エントリーを 1 件だけ扱うコンテンツタイプです。
- Components … 複数のコレクション型・シングル型で使い回せる構造です。単体ではコンテンツとして存在できないため厳密にはコンテンツタイプではありませんが、コレクション型・シングル型と同様に Content-type Builder で作成・管理します。
この 3 つはいずれも Content-type Builder のサブナビでカテゴリとして表示され、すでに作成済みのコンテンツタイプ/コンポーネントが一覧されます。
Content-type Builder のサブナビで検索アイコン をクリックすると、コレクション型・シングル型・コンポーネントを探せます。
サブナビには、すべてのコンテンツタイプ/コンポーネントに共通で効く集約の Save ボタンもあります。コンテンツタイプ/コンポーネントとフィールドのステータス表示と合わせ、複数のタイプやコンポーネントを同時に編集できます。表示されるステータスは次のとおりです。
New/N… 新規で、まだ保存していないコンテンツタイプ/コンポーネントまたはフィールドです。Modified/M… 前回の保存以降に変更があります。Deleted/D… 削除済みですが、保存するまで確定しません。
Save の横の ... から Undo/Redo last change や Discard all changes などにアクセスできます。これらも集約されており、前回保存以降にすべてのコンテンツタイプ・コンポーネント・フィールドで行った直近の操作に適用されます。
使い方
コンテンツタイプの作成
Content-type Builder では、シングル型・コレクション型に加え、コンポーネントも新規に作成できます。
Strapi AI でコンテンツタイプを作成 NewThis content is new.
GrowthThis feature is available with a Growth plan.管理パネルで有効にしたと、Strapi AI が自然言語でコンテンツタイプの作成・編集を補助します。
Content-Type Builder で Strapi AI を使うには、管理パネル右下の をクリックし、必要な内容を説明します。

チャット画面下部の から、既 存の Strapi やフロントエンドのコード、Figma プロジェクトの取り込み、デザイン画像の添付による構造抽出も行えます。
プロンプトを具体的にすると、生成されるスキーマは意図に近づきやすくなります。
リレーション作成の例: Could you please generate a collection of dogs then also generate an owner collection and add relationship to dogs? An owner can have multiple dogs, but a dog can only have one owner.
Strapi AI includes 1,000 credits per month on the Growth plan, and 10 free credits during the free trial. Lightweight actions use fewer credits, while more complex ones use more.
You can check your credit usage in the Settings Overview of the admin panel. Notifications are sent when your usage reaches 80%, 90%, and 100% of your monthly allowance.
When your credits run out on the Growth plan, you can keep using Strapi AI, with overages billed monthly.
For more information about Strapi AI, please refer to the dedicated support article.
手動でコンテンツタイプを作成

- コレクション型とシングル型のどちらを作るか決めます。
- 作成したいタイプに対応する Content-type Builder のカテゴリで Create new collection/single type をクリックします。
- 作成ウィンドウの Display name に、新しいコンテンツタイプの表示名を入力します。
- API ID を確認し、自動入力された値が意図どおりか確認します。コレクション型の名前はコンテンツマネージャーでは複数形で表示されるため、表示名は単数形を推奨します。複数形の取り違えは API ID で修正できます。
- (任意)Advanced Settings タブで次を設定できます。
設定名 手順 Draft & publish チェックを入れると、公開前に下書きとしてエントリーを管理できます(下書きと公開)。 Internationalization チェックを入れると、エントリーを別ロケールに翻訳できます。 - Continue をクリックします。
- 必要なフィールドを追加・設定します(コンテンツタイプのフィールド設定)。
- Save をクリックします。
新しいコンテンツタイプは保存されて初めて作成済みとみなされます。保存には少なくとも 1 つ、正しく設定したフィールドが必要です。未達の場合、タイプは作成されず、Content-type Builder のカテゴリにも載らず、コンテンツマネージャー では使えません。
新しいコンポーネント

- Content-type Builder のサブナビで Components カテゴリを開き、Create new component をクリックします。
- コンポーネント作成ウィンドウで基本設定を行います。
- Display name にコンポーネント名を入力します。
- 既存カテ ゴリを選ぶか、テキストボックスに新しいカテゴリ名を入力して作成します。
- (任意) コンポーネントのアイコンを選びます。一覧をスクロールせず検索する場合は を使えます。
- Continue をクリックします。
- 必要なフィールドを追加・設定します(コンテンツタイプのフィールド設定)。
- Save をクリックします。
コンテンツタイプの編集
既存のコンテンツタイプはすべて Content-type Builder で管理できます。編集対象のコンテンツタイプまたはコンポーネントを選ぶと、画面右側に編集・管理のオプションが表示されます。

設定
- コンテンツタイプの Edit をクリックして設定を開きます。
- 必要な項目を編集します。
- Basic settings
- Advanced settings


- Display name: 管理パネルに表示されるコンテンツタイプ/コンポーネントの名前です。
- API ID (singular): API で使う名前です。表示名から自動生成されますが編集できます。
- API ID (plural): API で使う複数形の名前です。表示名から自動生成されますが編集できます。
- Type: Collection type または Single type のいずれかです。


- Draft & Publish: 下書きと公開を有効にします。既定ではオフです。
- Internationalization: 多言語(Internationalization)を有効にします。既定で はオフです。
- ダイアログで Finish をクリックします。
- Content-Type Builder のナビゲーションで Save をクリックします。
フィールド
コンテンツタイプのフィールド一覧では次の操作ができます。
- でフィールドの基本/詳細設定を開いて編集する
- Add another field で新しいフィールドを追加する
- をドラッグしてフィールド順を変える
- でフィールドを削除する
フィールド名の変更は可能ですが、データベース上では新しいフィールドの追加と旧フィールドの扱いの切り替えに相当します。データ自体は消えませんが、旧名に紐づいていた値は管理パネルから参照できなくなる場合があります。
コンテンツタイプのフィールド設定
コンテンツタイプは 1 つ以上のフィールドで構成されます。各フィールドは一定の種類のデータを入れる前提で、コンテンツマネージャー で入力します。
Content-type Builder では、新規作成時に加え、あとからコンテンツタイプまたはコンポーネントを編集するときにもフィールドを追加できます。
作成・編集しているコンテンツタイプ/コンポーネントによって、利用できるフィールド(コンポーネントや Dynamic Zone を含む)は異なります。

Text
Text フィールドは短めのテキスト用の入力欄です。タイトルや説明などに向きます。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | Text フィールドの名前を入力します。 |
| Type | Short text(最大 255 文字)か Long text のいずれかを選びます。 |
| 設定名 | 手順 |
|---|---|
| Default value | Text フィールドの既定値を入力します。 |
| RegExp pattern | Text の値が特定形式になるよう正規表現を入力します。 |
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
| Unique field | チェックすると他フィールドと同じ値は登録できません。 |
| Maximum length | チェックして最大文字数を定義します。 |
| Minimum length | チェックして最小文字数を定義します。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Rich Text (Blocks)
Rich Text (Blocks) フィールドは、リアルタイム表示と豊富なオプションを持つエディターです。長文に加え、画像やコードを含める用途に使えます。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | Rich Text (Blocks) フィールドの名前を入力します。 |
| 設定名 | 手順 |
|---|---|
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Blocks エディターを使う場合、React フロントでは Strapi Blocks React Renderer の利用を推奨します。
Number
Number フィールドは整数・小数・浮動小数など、数値一般を入力する欄です。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | Number フィールドの名前を入力します。 |
| Number format | integer、big integer、decimal、float から選びます。 |
| 設定名 | 手順 |
|---|---|
| Default value | Number フィールドの既定値を入力します。 |
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
| Unique field | チェックすると他フィールドと同じ値は登録できません。 |
| Maximum value | チェックして最大値を定義します。 |
| Minimum value | チェックして最小値を定義します。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Date
Date フィールドは、日付(年・月・日)、時刻(時・分・秒)、または日時のいずれかを選べる UI になります。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | Date フィールドの名前を入力します。 |
| Type | date、datetime、time のいずれかを選びます。 |
| 設定名 | 手順 |
|---|---|
| Default value | Date フィールドの既定値を入力します。 |
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
| Unique field | チェックすると他フィールドと同じ値は登録できません。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Media
Media フィールドでは、アプリのメディアライブラリにアップロード済みのメディア(画像・動画など)を 1 件または複数件選べます。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | Media フィールドの名前を入力します。 |
| Type | Multiple media で複数アップロードを許可するか、Single media で 1 件だけに制限するかを選びます。 |
| 設定名 | 手順 |
|---|---|
| Select allowed types of media | ドロップダウンを開き、このフィールドで許可しないメディア種別のチェックを外します。 |
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
| Unique field | チェックすると他フィールドと同じ値は登録できません。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Relation
Relation フィールドは、別のコンテンツタイプ(コレクション型である必要があります)との関連付けを定義します。
リレーションは次の 6 種類があります。
One way: コンテンツタイプ A がコンテンツタイプ B を has one
One-to-one: コンテンツタイプ A と B が has and belong to one
One-to-many: コンテンツタイプ A がコンテンツタイプ B に belongs to many
Many-to-one: コンテンツタイプ B がコンテンツタイプ A を has many
Many-to-many: コンテンツタイプ A と B が has and belongs to many
Many way: コンテンツタイプ A がコンテンツタイプ B を has many
少なくとも一方が複数エントリーを参照できるリレーションをマルチリレーションと呼びます。Content-type Builder では one-to-many、many-to-one、many-to-many、many-way が該当します。コンテンツマネージャーではマルチセレクト風に表示され、REST・GraphQL・Document Service API では配列として返ります。一方、one-way と one-to-one は単一の関連エントリーを返します(詳しくは API リクエストでのリレーション管理 を参照してください)。
- Basic settings
- Advanced settings
- Condition
基本設定では、既存のどのコンテンツタイプと、どの種類で関連付けるかを選びます。編集画面にはグレーのボックスが 2 つあり、それぞれリレーション両側のコンテンツタイプを表します。ボックスのあいだに選べるリレーション種別のアイコンが並びます。
- 2 つ目のグレーボックスをクリックしてコンテンツタイプ B を指定します。すでに作成済みのコレクション型にします。
- 両タイプのあいだに表示されるアイコンから、設定するリレーション種別を選びます。
- コンテンツタイプ A 側の Field name(A 上でのフィールド名)を入力します。
- (リレーション種別により無効な場合は不要)コンテンツタイプ B 側の Field name を入力します。
| 設定名 | 手順 |
|---|---|
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
ページの木構造を表現する例です。
Pageコレクション型に "Slug"(UID)と、(任意で)兄弟順序用の "Order"(Integer)を追加します。PageからPageへの Relation で Many-to-one を選び、各ページが "Parent page" を持てるようにします。Strapi は逆方向の "Children pages" も自動で用意します。- データ取得時は
childrenを再帰的に populate して木を読み込みます。レスポンス肥大化を避けるため、再帰の深さは小さく保ちます。
例
{
populate: {
children: {
fields: ['title', 'slug'],
populate: {
children: {
fields: ['title', 'slug'],
},
},
},
},
}
同様の populate は GraphQL や Document Service API でも使えます(populate の理解)。
Boolean
Boolean フィールドは、真偽値(Yes / No、1 / 0、True / False など)を切り替える UI です。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | Boolean フィールドの名前を入力します。 |
| 設定名 | 手順 |
|---|---|
| Default value | Boolean の既定値として true、null、false のいずれかを選びます。 |
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
| Unique field | チェックすると他フィールドと同じ値は登録できません。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
JSON
JSON フィールドは JSON 形式でオブジェクトや配列を格納します。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | JSON フィールドの名前を入力します。 |
| 設定名 | 手順 |
|---|---|
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Email
Email フィールドは形式チェック付きのメールアドレス入力欄です。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | Email フィールドの名前を入力します。 |
| 設定名 | 手順 |
|---|---|
| Default value | Email フィールドの既定値を入力します。 |
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
| Unique field | チェックすると他フィールドと同じ値は登録できません。 |
| Maximum length | チェックして最大文字数を定義します。 |
| Minimum length | チェックして最小文字数を定義します。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Password
Password フィールドは暗号化されるパスワード入力欄です。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | Password フィールドの名前を入力します。 |
| 設定名 | 手順 |
|---|---|
| Default value | Password フィールドの既定値を入力します。 |
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
| Maximum length | チェックして最大文字数を定義します。 |
| Minimum length | チェックして最小文字数を定義します。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Enumeration
Enumeration フィールドは、ドロップダウンに出す値のリストを定義します。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | Enumeration フィールドの名前を入力します。 |
| Values | 列挙値を 1 行に 1 つずつ入力します。 |
| 設定名 | 手順 |
|---|---|
| Default value | Enumeration の既定値を選びます。 |
| Name override for GraphQL | フィールドの GraphQL 型を上書きするスキーマ名を入力します。 |
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Enable localization for this field | (コンテンツタイプで Internationalization が有効な場合)ロケールごとに別の値を持てます。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Enumeration の値は、先頭が数字だけにならないようにします。GraphQL プラグイン有効時、数字だけの値が原因でサーバーが異常終了する場合があります。
UID
UID フィールドは一意の識別子を設定します。同じコンテンツタイプの既存フィールドに基づいて自動生成することもできます。
- Basic settings
- Advanced settings
- Condition
| 設定名 | 手順 |
|---|---|
| Name | UID フィールドの名前を入力します。特殊文字やスペースは使えません。 |
| Attached field | UID に紐づける既存フィールドを選びます。別に紐づけない場合は None です。 |
| 設定名 | 手順 |
|---|---|
| Default value | UID フィールドの既定値を入力します。 |
| Private field | チェックすると非公開となり API 検索の対象外になります。 |
| Required field | チェックすると未入力のままではエントリーの作成・保存ができません。 |
| Maximum length | チェックして最大文字数を定義します。 |
| Minimum length | チェックして最小文字数を定義します。 |
- Click the Apply condition button.
- Define the if part of the condition, based on a Boolean or Enumeration field of the same content-type (e.g. if
boolean_fieldistrue). - Define the then part of the condition by choosing whether to hide or show the field you are configuring (e.g. then
show carousel_media).
Attached field に基づいてスラッグ用の UID を作れます。