Home > Software design >  Laravel 8.x - Not able to add a button in laravel component file
Laravel 8.x - Not able to add a button in laravel component file

Time:12-29

I am learning Laravel blade . I have installed the breeze and I am trying to add a button in the dashboard.blade.php .

<x-app-layout>
    <x-slot name="header">
        <h2 >
            {{ __('Dashboard') }}
        </h2>
    </x-slot>

    <div >
        <div >
            <div >
                <div >
                    Hello, You're logged in!
                    <br><br><button type="button" >Danger</button>
                </div>
            </div>
        </div>
    </div>
</x-app-layout>

The button is appearing without any shape or outline. Can you please let me know what is the mistake i am doing here.

enter image description here

CodePudding user response:

Looking at your markup, there are a few Tailwind related classes, so I will assume you are using Tailwindcss.

In this case, you are trying to use Bootstrap classes in a Tailwind CSS setup.

In order to achieve a button similar to the danger one you could do:

<button 
    type="button" 
    >Danger</button>

https://tailwindcss.com/docs/installation

  • Related