Styling

  • Most styling can be customized in the theme css

  • Each field has a lot of styling options that hopefully covers your needs, if not - please create a feature or PR.

  • Every field also has a blade component class you can extend or replace.

If you still decide to publish the views it would be a good idea to watch this package for changes.

php artisan vendor:publish --tag=tall-form-views

Chainable methods that controls the field design

//position
inline() //Labels to the left, override Form attribute 'inline'
stacked() //Labels above, override Form attribute 'inline'

//width
colspan(int $cols) //12 grid

//field classes
fieldWidth(string $class)
class(string $classes, bool $merge = true) //Merge or replace the fields default classes
wrapperClass(string $class)
errorClass(string $classes, bool $append = true) //Append or replace the fields default error classes

//labels
labelWidth(string $class) //Used only on inline forms. Default = sm:w-1/3
labelWrapperClass(string $classes)
labelClass(string $classes, bool $merge = true) //$merge = append to field default classes
labelAlign(string $class)
hideLabel()

Example

//example
KeyVal::make('Name')->labelClass('mb-0')->fields([
    Input::make('English', 'en')->colspan(6)->labelClass('font-medium capitalize my-0', true)->rules('required'),
    Input::make('Swedish', 'sv')->colspan(6)->labelClass('font-medium capitalize my-0', true)->rules('required'),
])

Last updated