Skip to main content
The repeater component allows you to create a repeatable set of form fields.

Basic Usage

use Filament\Forms\Components\Repeater;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Select;

Repeater::make('members')
    ->schema([
        TextInput::make('name')->required(),
        Select::make('role')
            ->options([
                'member' => 'Member',
                'admin' => 'Admin',
            ])
            ->required(),
    ])

Available Methods

schema
method
Defines the repeatable fields.
Repeater::make('items')
    ->schema([
        TextInput::make('title'),
        Textarea::make('description'),
    ])
defaultItems
method
Sets number of default empty items.
Repeater::make('members')
    ->schema([...])
    ->defaultItems(3)
addActionLabel
method
Customizes the add button label.
Repeater::make('members')
    ->schema([...])
    ->addActionLabel('Add member')
addable
method
Controls whether items can be added.
Repeater::make('items')
    ->schema([...])
    ->addable(false)
deletable
method
Controls whether items can be deleted.
Repeater::make('items')
    ->schema([...])
    ->deletable(false)
reorderable
method
Controls whether items can be reordered.
Repeater::make('items')
    ->schema([...])
    ->reorderable(false)
reorderableWithButtons
method
Enables reordering with up/down buttons.
Repeater::make('items')
    ->schema([...])
    ->reorderableWithButtons()
reorderableWithDragAndDrop
method
Controls drag-and-drop reordering.
Repeater::make('items')
    ->schema([...])
    ->reorderableWithDragAndDrop(false)
collapsible
method
Makes items collapsible.
Repeater::make('items')
    ->schema([...])
    ->collapsible()
collapsed
method
Makes items collapsed by default.
Repeater::make('items')
    ->schema([...])
    ->collapsible()
    ->collapsed()
cloneable
method
Allows cloning items.
Repeater::make('items')
    ->schema([...])
    ->cloneable()
itemLabel
method
Customizes item labels.
Repeater::make('items')
    ->schema([...])
    ->itemLabel(fn (array $state): ?string => $state['title'] ?? null)
simple
method
Removes item containers for simple layouts.
Repeater::make('links')
    ->simple(
        TextInput::make('url')
    )
minItems
method
Sets minimum number of items.
Repeater::make('items')
    ->schema([...])
    ->minItems(2)
maxItems
method
Sets maximum number of items.
Repeater::make('items')
    ->schema([...])
    ->maxItems(10)
columns
method
Sets grid columns for fields.
Repeater::make('members')
    ->schema([...])
    ->columns(2)
grid
method
Sets grid columns for repeater items.
Repeater::make('items')
    ->schema([...])
    ->grid(2)
relationship
method
Configures HasMany relationship.
Repeater::make('phoneNumbers')
    ->relationship()
    ->schema([
        TextInput::make('number')->required(),
        Select::make('type')->options(['mobile' => 'Mobile', 'home' => 'Home']),
    ])

Common Patterns

Contact Information

Repeater::make('contacts')
    ->schema([
        TextInput::make('name')
            ->required(),
        TextInput::make('email')
            ->email()
            ->required(),
        TextInput::make('phone')
            ->tel(),
    ])
    ->columns(3)
    ->defaultItems(1)
    ->collapsible()

Simple List

Repeater::make('links')
    ->simple(
        TextInput::make('url')->url()
    )
    ->minItems(1)
    ->maxItems(5)

Product Variants

Repeater::make('variants')
    ->schema([
        TextInput::make('name')->required(),
        TextInput::make('sku')->required(),
        TextInput::make('price')
            ->numeric()
            ->prefix('$')
            ->required(),
        TextInput::make('stock')
            ->numeric()
            ->default(0),
    ])
    ->columns(2)
    ->collapsible()
    ->itemLabel(fn (array $state): ?string => $state['name'] ?? null)
    ->cloneable()

FAQ Items

Repeater::make('faqs')
    ->schema([
        TextInput::make('question')->required(),
        Textarea::make('answer')->required(),
    ])
    ->itemLabel(fn (array $state): ?string => $state['question'] ?? null)
    ->collapsible()
    ->reorderableWithButtons()
    ->addActionLabel('Add FAQ')

Database Casting

Add an array cast when storing as JSON:
use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    protected function casts(): array
    {
        return [
            'members' => 'array',
        ];
    }
}

Build docs developers (and LLMs) love