> ## Documentation Index
> Fetch the complete documentation index at: https://buttercms.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# The Component Picker

> Use the ButterCMS Component Picker to build flexible page layouts by selecting, adding, and reordering Components from an allowlist of predefined blocks.

The **Component Picker** field allows you to build dynamic landing pages.

Here's how it works in a nutshell:

1. Add a Component Picker field to a Page or Page Type.
2. Create an allowlist of Components to be used in the field - you can choose from existing Components, or create new ones.
3. When someone creates an instance of that Page or Page Type, they can select Components from that list.

> [!TIP]
>
> When someone adds Components from a Picker, they can add multiple instances of each Component, and they can add Components in any order.

In the below example, someone has set up a "Page Body" Component Picker field in a Page Schema. They've added two Components to the allowlist: a "Left content block", and a "Right content block".

![Component Picker](https://cdn.buttercms.com/dTlwma0xS6WB1osbWCHS)

> [!NOTE]
>
> If a content creator were creating an instance of this Page Type, they might select Components to create a Page body like this:
>
> * Right content block
> * Left content block
> * Left content block
> * Right content block

## Field at a glance

### Input and output

> [card] Input type
>
> Component Picker field defined in the Page schema with your choice of field types

> [card] API output
>
> `array`

### API response

> [card] [Fetching Components from the API](https://buttercms.com/docs/build-your-app/rendering-complex-field-types/fetching-components.md#component-picker-dynamic-sections)
>
> Learn more about how Components are returned by the API, and how to model Component content in your app.

### Field configuration and validation options

> [!TIP]
>
> Component fields don't have any configuration options of their own (except for the usage of [conditional fields](https://buttercms.com/docs/create-content/creating-editing-content/components/conditional-fields-components.md)). Instead, each field you add to a component has its own [validation and configuration options](https://buttercms.com/docs/create-content/creating-editing-content/fields-basics/configuring-and-validating-fields.md).

## Adding a Component Picker

**1. Add the Component Picker Field**

Click on the **Component Picker** option in the Page Type configuration sidebar:

![Component picker field option](https://cdn.buttercms.com/0nxWV0UTSZqLb7BpZqJb)

This will add the Component Picker to your page schema:

![Page schema component picker field](https://cdn.buttercms.com/6HaP0GLTRuLFqJP7wgSA)

**2. Name the Component Picker**

Give the field a descriptive name. Common names include "Body", "Sections", or "Content Blocks".

**3. Add Components to the Picker**

Click on the **Add from Library** button and select the components that content editors should be able to use:

![Component picker with components](https://cdn.buttercms.com/UPKu1G63TXu8A0PRNxKY)

Or, you can define Components directly from inside the Component Picker.

## Using the Component Picker

### Adding Components

**1. Open the Component Picker**

In your Page, look for the Component Picker section. Pickers can be identified by the **Component Picker** button.

Click on the button to add components:

![Select the Body component picker icon](https://cdn.buttercms.com/LBV4HhsQvW5BRJQ2EpA3)

This opens a **Component Library** modal of Components that have been filtered to those in the Picker's allowlist.

![Select components from the Component Library](https://cdn.buttercms.com/tOeTiMqQGpZfdgqJ2NjA)

**2. Choose a Component**

Select from the available components, and a new component section will appear.

**3. Fill in the Component Fields**

Fill in the fields on the individual Components, and then Save or Publish the Page.

![Text Component](https://cdn.buttercms.com/P12yvhEZTbef6RcTjb76)

![Text Component](https://cdn.buttercms.com/GAwh6yt2SFm0QnQRGOiS)

### Cloning Components

You can clone Components within a picker with the  ***clone icon***.

![Cloning components in picker](https://cdn.buttercms.com/FCI8jPgPTxm4pkYBSb9f)

### Expanding and collapsing Components

Click on the name of any Component in the Picker to expand or collapse it. You can also click on the **Expand All** button to expand all Components simultaneously.

![Expand Collapse Components](https://cdn.buttercms.com/foSRNdbNRamzl3TtpwEg)

> [!TIP]
>
> **Tip**: Collapse components you're not actively editing to keep your page easier to navigate, especially for pages with many components.

### Reordering Components

To re-order Components, you simply have to drag & drop a Component up or down your content layout.

![Reordering components](https://cdn.buttercms.com/zYTngbcJQFi04gWmyBp9)

#### Using arrow controls

If you prefer not to drag, you can also use the arrow buttons:

1. **Locate the up/down arrows** next to the component name
2. **Click the up arrow** to move the component higher on the page
3. **Click the down arrow** to move the component lower
4. The page preview will reflect the new order

> [!TIP]
>
> Arrow controls are especially useful when you need to move a component just one or two positions, or when using a trackpad where drag-and-drop can be challenging.

> [!NOTE]
>
> **Pro Tip**: Collapse all components before reordering. This gives you a cleaner view of your page structure and makes drag-and-drop easier, especially for pages with many components.

## Best practices

> [accordion] Limit available Components
>
> Only include components that make sense for each Page Type. A careers page doesn't need a product pricing component.

> [accordion] Establish content guidelines
>
> Document which components to use in which situations. Create a style guide for content editors.

> [accordion] Plan page structure
>
> Before adding components, plan the page layout. Consider the user journey and information hierarchy.

> [accordion] Preview before publishing
>
> Always preview the page to see how components render together before publishing.

> [accordion] Use consistent naming
>
> Name Component Picker fields consistently across Page Types (e.g., always "Body" or always "Sections").

## Related topics

> [card] [Components: overview](https://buttercms.com/docs/create-content/creating-editing-content/components/components-overview.md)

> [card] [Component Library overview](https://buttercms.com/docs/create-content/creating-editing-content/components/component-library-overview.md)

> [card] [Conditional fields in Components](https://buttercms.com/docs/create-content/creating-editing-content/components/conditional-fields-components.md)

> [card] [The Component Picker](https://buttercms.com/docs/create-content/creating-editing-content/components/using-component-picker.md)

> [card] [Components: fetching via API and adding to the application](https://buttercms.com/docs/build-your-app/rendering-complex-field-types/fetching-components.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.