bladewindUI

Laravel 8 Users

If you are using BladewindUI in a Laravel 8 project you will need to define the component attributes using camelCase instead of the default snake_case style used throughout the documentation. For some reason component props defined using snake_case style do not work consistently across different Laravel 8 versions.

We used the BladewindUI components in a "laravel/framework": "^8.75" project and snake_case attributes worked fine. Other users using Laravel 8 did not get the desired results when they applied snake_case attributes on some components. If you experience such a behaviour, please default to using the camelCase versions of the components attributes. See example below.


Button Example

BladewindUI Buttons can have spinners that are enabled by setting the has_spinner="true". Laravel 8 users will instead do hasSpinner="true". If you want the spinner to be visible by default you can set the attribute showSpinner="true".


  


                
                    <x-bladewind.button
                        hasSpinner="true" 
                        showSpinner="true">
                        Saving...
                    </x-bladewind.button>
                
            


This principle is applicable for ALL component attributes that are more than one word. Single word attributes like name, type, size, color are not affected. Any multi word attribute will need to be camelCased. A few examples are: hasSpinner, showSpinner, canSubmit, showIcon, hasShadow, acceptedFileTypes, showCloseIcon etc.