Download the PHP package apility/laravel-bootstrap without Composer
On this page you can find all versions of the php package apility/laravel-bootstrap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download apility/laravel-bootstrap
More information about apility/laravel-bootstrap
Files in apility/laravel-bootstrap
Package laravel-bootstrap
Short Description Bootstrap components for Laravel Blade
License MIT
Informations about the package laravel-bootstrap
Bootstrap components for Laravel Blade
Table of Contents
- Installation
- Configuration
- Customization
- Components
- Alert
- AlertHeading
- Button
- Card
- CardHeader
- CardImage
- CardTitle
- Nav
- Navbar
- NavbarBrand
- NavDropdown
- NavLink
- Search
Installation
Configuration
To override the default configuration, you must first publish it
This will add a bootstrap.php file to your config directory.
The only supported option you can configure currently, is the 'prefix' property. This changes the names of the components.
The default prefix is bs, if you change it to e.g. bootstrap you will have to use the provided components like this:
Customization
To customize the provided component's views, you must first publish them
Components
Alert
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
| variant | string | primary |
The color variant of the alert. |
| dismissible | boolean | false |
Whether the alert is dismissible. |
| fade | boolean | true |
Whether the alert should fade out. |
| show | boolean | true |
Whether the alert should be visible. |
AlertHeading
Button
If the href attribute is set, the button will be rendered as an <a> element.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
| variant | string | primary |
The color variant of the alert. |
| type | string | null |
Sets the button type when used as a regular button, e.g. submit |
| href | string | null |
Sets the href attribute, and makes the button into a link |
| outline | boolean | false |
Whether the alert should appear outlined |
| large | boolean | false |
Whether the alert should be large |
| small | boolean | false |
Whether the alert should be small |
| disabled | boolean | false |
Whether the alert is disabled |
Card Header
Card Image
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
| src | string | null |
The image source |
| image | array | null |
An associative array, or object containing 'src', 'title' and 'alt' properties |
| placement | string | 'top' |
The placement of the image, either 'top' or 'bottom' |
Card title
Card
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
| header | string | null |
The header of the card |
| title | string | null |
The title of the card |
| image | string | null |
Either an image source url, or an associate array or object that can be used as an Image |
| link | array | null |
An associative array, or object containing 'href' and 'title' properties |
Nav
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
| links | array | [] |
An array or collection of links |
The links can be passed either as a collection or a regular array.
The items can be either Bootstrap\Models\Link instances, associative arrays, or standard objects. They will internally be transformed to Bootstrap\Models\Link instances.
| Name | Type | Default | Description |
|---|---|---|---|
| url | string | # |
The link url |
| title | string | '' |
The link title |
| target | string | '_self' |
The link target |
| active | boolean | false |
Whether the link is active |
| disabled | boolean | false |
Whether the link is disabled |
| children | array | [] |
The link children, same format as above |
Navbar
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
| links | array | [] |
Links to render, see Nav |
| variant | string | primary |
The background color variant of the navbar |
| light | boolean | false |
Whether the navbar content is light |
| dark | boolean | false |
Whether the navbar content is dark |
NavbarBrand
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
| href | string | # |
The link of the brand |
NavDropdown
This component is used internally when rendering Nav components, it extends the NavLink component.
NavLink
This component is used internally when rendering Nav components.
Search
Renders a search form for use in the Navbar. It will submit the query string as query to the given url using the given method.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
| action | string | ? |
The action of the form |
| method | string | GET |
The method of the form |
| placeholder | string | Search... |
The placeholder of the search input |
| label | string | Search |
The label of the search submit button |
All versions of laravel-bootstrap with dependencies
illuminate/view Version ^7.0|^8.0|^9.0
illuminate/support Version ^7.0|^8.0|^9.0