Trying to understand the layout system.

Hey While trying to update a plugin I ran into a layout issue. I want my Field to be full width but can't make it happen. My code is like this:
public static function configure(Schema $schema): Schema
{
return $schema
->components([
Grid::make()
->schema([
GazeBanner::make()->lock()
]),
Grid::make()
->schema([
TextInput::make('name')
->maxLength(255)
->required(),
TextInput::make('email')
->maxLength(255)
->unique()
->email()
->required(),
TextInput::make('password')
->password()
->required(fn($livewire): bool => $livewire instanceof CreateUser)
->revealable(filament()->arePasswordsRevealable())
->rule(Password::default())
->autocomplete('new-password')
->dehydrated(fn($state): bool => filled($state))
->dehydrateStateUsing(fn($state): string => Hash::make($state)),
])

]);
}
public static function configure(Schema $schema): Schema
{
return $schema
->components([
Grid::make()
->schema([
GazeBanner::make()->lock()
]),
Grid::make()
->schema([
TextInput::make('name')
->maxLength(255)
->required(),
TextInput::make('email')
->maxLength(255)
->unique()
->email()
->required(),
TextInput::make('password')
->password()
->required(fn($livewire): bool => $livewire instanceof CreateUser)
->revealable(filament()->arePasswordsRevealable())
->rule(Password::default())
->autocomplete('new-password')
->dehydrated(fn($state): bool => filled($state))
->dehydrateStateUsing(fn($state): string => Hash::make($state)),
])

]);
}
And it looks like the screenshot attached. I am trying to have the two grids below each other. Basically the Banner should be fullWidth. Not sure how to get this done. Thanks soo much
No description
Solution:
->columnSpanFull() on the first Grid
Jump to solution
2 Replies
Solution
awcodes
awcodes2mo ago
->columnSpanFull() on the first Grid
JJSanders
JJSandersOP2mo ago
Thanks. I had to remove the Grid to get it to full width like so:
GazeBanner::make()->lock()->columnSpanFull()
GazeBanner::make()->lock()->columnSpanFull()

Did you find this page helpful?