Set max width for the resource modal (ManageRecords made via ` --simple`)

Is there a way to set the max width for the "create" modal?
namespace App\Filament\Resources\TaskResource\Pages;

use App\Filament\Resources\TaskResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

class ManageTasks extends ManageRecords
{
protected static string $resource = TaskResource::class;

protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}
namespace App\Filament\Resources\TaskResource\Pages;

use App\Filament\Resources\TaskResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

class ManageTasks extends ManageRecords
{
protected static string $resource = TaskResource::class;

protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}
Solution:
use
->modalWidth()
->modalWidth()
...
Jump to solution
2 Replies
Solution
Tieme
Tiemeβ€’12mo ago
use
->modalWidth()
->modalWidth()
with one of below ENUMS
enum MaxWidth: string
{
case ExtraSmall = 'xs';

case Small = 'sm';

case Medium = 'md';

case Large = 'lg';

case ExtraLarge = 'xl';

case TwoExtraLarge = '2xl';

case ThreeExtraLarge = '3xl';

case FourExtraLarge = '4xl';

case FiveExtraLarge = '5xl';

case SixExtraLarge = '6xl';

case SevenExtraLarge = '7xl';

case Full = 'full';

case MinContent = 'min';

case MaxContent = 'max';

case FitContent = 'fit';

case Prose = 'prose';

case ScreenSmall = 'screen-sm';

case ScreenMedium = 'screen-md';

case ScreenLarge = 'screen-lg';

case ScreenExtraLarge = 'screen-xl';

case ScreenTwoExtraLarge = 'screen-2xl';

case Screen = 'screen';
}
enum MaxWidth: string
{
case ExtraSmall = 'xs';

case Small = 'sm';

case Medium = 'md';

case Large = 'lg';

case ExtraLarge = 'xl';

case TwoExtraLarge = '2xl';

case ThreeExtraLarge = '3xl';

case FourExtraLarge = '4xl';

case FiveExtraLarge = '5xl';

case SixExtraLarge = '6xl';

case SevenExtraLarge = '7xl';

case Full = 'full';

case MinContent = 'min';

case MaxContent = 'max';

case FitContent = 'fit';

case Prose = 'prose';

case ScreenSmall = 'screen-sm';

case ScreenMedium = 'screen-md';

case ScreenLarge = 'screen-lg';

case ScreenExtraLarge = 'screen-xl';

case ScreenTwoExtraLarge = 'screen-2xl';

case Screen = 'screen';
}
Ostap Brehin πŸ‡ΊπŸ‡¦
Thank you very much! It worked Actions\CreateAction::make()->modalWidth(MaxWidth::Large),
Want results from more Discord servers?
Add your server