Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Bootstrap Twig Components Laravel Package

ebitkov/bootstrap-twig-components

View on GitHub
Deep Wiki
Context7

Alerts

(see also https://getbootstrap.com/docs/5.3/components/alerts/)

Fore more details on how to use UX components please visit the Symfony documentation.

Basic Usage

The AlertComponent takes two arguments:

  • a type equal to the alert variants defined on the Bootstrap documentation
  • a message 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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views