FilamentF
Filament2y ago
5 replies
Dwayne

How to set width of registration page

I've created a custom page for the registration process. I want the content to be wider. The getMaxContentWidth function isn't doing anything. So, the white block needs to become wider.

namespace App\Filament\Admin\Pages\Auth;

use Filament\Forms\Contracts\HasForms;
use Filament\Forms\Form;
use Filament\Pages\Auth\Register as RegisterPage;
use Filament\Forms\Components\Wizard;
use Filament\Support\Enums\MaxWidth;

class CustomRegistration extends RegisterPage implements HasForms
{
    public function mount(): void
    {
        parent::mount();
    }
 
    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Wizard::make([
                    Wizard\Step::make('Personal')
                        ->schema([
                            // ...
                        ]),
                    Wizard\Step::make('Company')
                        ->schema([
                            // ...
                        ]),
                    Wizard\Step::make('Account')
                        ->schema([
                            // ...
                        ]),
                ])
            ])
            ->statePath('data');
    }

    public function getMaxContentWidth(): MaxWidth
    {
        return MaxWidth::Full;
    }
}
Schermafbeelding_2024-03-28_om_14.45.14.png
Was this page helpful?