> ## Documentation Index
> Fetch the complete documentation index at: https://filament-34a8cf01.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom layouts

> [!WARNING]
>
> You are currently viewing the documentation for Filament 3.x, which is a previous version of Filament.
>
> Looking for the current stable version? Visit the [5.x documentation](https://filament-34a8cf01.mintlify.site/5.x/forms).

![Filament](https://filament-34a8cf01.mintlify.site/docs/images/laracasts/filament-laracasts-logo.webp)
![Laracasts](https://filament-34a8cf01.mintlify.site/docs/images/laracasts/laracasts.svg)

### Build a Custom Form Layout

Watch the Build Advanced Components for Filament series on Laracasts - it will teach you how to build components, and you'll get to know all the internal tools to help you.

[Play Video](https://laracasts.com/series/build-advanced-components-for-filament/episodes/7?referer=DanHarrin)

![Laracasts](https://filament-34a8cf01.mintlify.site/docs/images/laracasts/laracasts.svg)

![Dan Harrin](https://avatars.githubusercontent.com/u/41773797?v=4)

Dan Harrin

Instructor

[https://twitter.com/danjharrin](https://twitter.com/danjharrin)

[https://danharrin.com](https://danharrin.com)

[https://github.com/danharrin](https://github.com/danharrin)

## View components

Aside from [building custom layout components](#custom-layout-classes), you may create "view" components which allow you to create custom layouts without extra PHP classes.

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Forms\Components\View;

View::make('filament.forms.components.wizard')
```

This assumes that you have a `resources/views/filament/forms/components/wizard.blade.php` file.

## Custom layout classes

You may create your own custom component classes and views, which you can reuse across your project, and even release as a plugin to the community.

> If you're just creating a simple custom component to use once, you could instead use a [view component](#view-components) to render any custom Blade file.

To create a custom component class and view, you may use the following command:

```bash theme={"theme":"gruvbox-dark-hard"}
php artisan make:form-layout Wizard
```

This will create the following layout component class:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Forms\Components\Component;

class Wizard extends Component
{
    protected string $view = 'filament.forms.components.wizard';

    public static function make(): static
    {
        return app(static::class);
    }
}
```

It will also create a view file at `resources/views/filament/forms/components/wizard.blade.php`.

## Rendering the component's schema

Inside your view, you may render the component's `schema()` using the `$getChildComponentContainer()` function:

```blade theme={"theme":"gruvbox-dark-hard"}
<div>
    {{ $getChildComponentContainer() }}
</div>
```

## Accessing the Eloquent record

Inside your view, you may access the Eloquent record using the `$getRecord()` function:

```blade theme={"theme":"gruvbox-dark-hard"}
<div>
    {{ $getRecord()->name }}
</div>
```

[Edit this page on GitHub](https://github.com/filamentphp/filament/edit/3.x/packages/forms/docs/04-layout/08-custom.md)

## Sponsored by

[Your logo here](https://github.com/sponsors/danharrin)


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