ebitkov/bootstrap-twig-components
(see also https://getbootstrap.com/docs/5.3/components/alerts/)
Fore more details on how to use UX components please visit the Symfony documentation.
The AlertComponent takes two arguments:
type equal to the alert variants defined on the Bootstrap documentationmessage to print<twig:bs:alert type="primary" message="Hello World"/>
translates to
<div class="alert alert-primary" role="alert">
Hello World
</div>
You can also completely overwrite the contents of the alert.
<twig:bs:alert type="danger">
<b>Warning:<b>
<p>It's dangerous out here!</p>
</twig:bs:alert>
translates to:
<div class="alert alert-danger" role="alert">
<b>Warning:</b>
<p>It's dangerous out here!</p>
</div>
The component will automatically set the alert class and an alert-{type} class for styling. It also appends
the role="alert" attribute.
How can I help you explore Laravel packages today?