LaravelPackages.net
Acme Inc.
Toggle sidebar
drafolin/filament-collapse

This plugins aims to collapse the space between multiple fields, in the same way as ToggleButtons->grouped()

2.831
12
v1.1.3
About drafolin/filament-collapse

drafolin/filament-collapse is a Laravel package for this plugins aims to collapse the space between multiple fields, in the same way as togglebuttons->grouped() . It currently has 12 GitHub stars and 2.831 downloads on Packagist (latest version v1.1.3). Install it with composer require drafolin/filament-collapse. Discover more Laravel packages by drafolin or browse all Laravel packages to compare alternatives.

Last updated

A layout field that collapses space between components.

Latest Version on Packagist Total Downloads

Filament Collapse

The Collapse Group field is a layout field that collapses space between components. It is useful for grouping related fields together, such as phone numbers or start and end dates.

Collapse Group

Installation

You can install the package via composer:

composer require drafolin/filament-collapse

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-collapse-views"

Usage

<?php
use Drafolin\FilamentCollapse\FilamentCollapse;

public function form(Form $form)
{
    return form
        ->schema([
            FilamentCollapse::make([
                // Add fields here. Ideally, these fields should be related.
                // For now, it's only been tested with TextInput fields, and fields that inherit from it.
                TextInput::make('first_name')
                    ->label('First Name'), // Labels are transformed into placeholders.
                TextInput::make('last_name')
                    ->label('Last Name'),
            ])
            ->label('Collapse Group'), // This field is a regular field, so it also supports base filament properties.
        ]);
}

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Everyone is welcome to contribute to this project. To do so, simply open an issue or a pull request.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments