PHPackages                             tiknil/bs-blade-forms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. tiknil/bs-blade-forms

ActiveLibrary[Templating &amp; Views](/categories/templating)

tiknil/bs-blade-forms
=====================

Collection of blade components for building form using bootstrap

0.7.1(2mo ago)0664↓50%MITPHPPHP ^8.1|^8.2|^8.3|^8.4CI passing

Since Jul 16Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/tiknil/bs-blade-forms)[ Packagist](https://packagist.org/packages/tiknil/bs-blade-forms)[ Docs](https://github.com/tiknil/bs-blade-forms)[ RSS](/packages/tiknil-bs-blade-forms/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (21)Used By (0)

Blade Form Components Library
=============================

[](#blade-form-components-library)

[![GitHub Actions](https://github.com/tiknil/bs-blade-forms/actions/workflows/main.yml/badge.svg)](https://github.com/tiknil/bs-blade-forms/actions/workflows/main.yml/badge.svg)[![Latest Version on Packagist](https://camo.githubusercontent.com/e4fc878318e58d9491f6c51876d57bd78d7f5a0c258cd5d0afe70be6392765ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74696b6e696c2f62732d626c6164652d666f726d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tiknil/bs-blade-forms)[![Total Downloads](https://camo.githubusercontent.com/307b7c3225fbb56976446e0280593f86e3408af5447917c39696923d26bca799/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74696b6e696c2f62732d626c6164652d666f726d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tiknil/bs-blade-forms)

Opinionated library designed to streamline the process of building forms in Laravel applications by leveraging Blade components and Boostrap utilities.

- [Key Features](#key-features)
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Components](#components)
    - [SearchSelect](#searchselect)
    - [Autocomplete](#autocomplete)
    - [MultiSelect](#multiselect)
    - [Select](#select)
    - [Input](#input)
    - [Textarea](#textarea)
    - [Checkbox](#checkbox)
    - [Radio](#radio)

### Key Features

[](#key-features)

- **Reduced boilerplate**: Minimize repetitive code and simplify the form-building process
- **Advanced Select Components**: Utilize `SearchSelect` and `MultiSelect` for enhanced and complex selection input needs, providing a better user experience.
- **Automatic Old Input Handling**: Automatically manage [old input](https://laravel.com/docs/validation#repopulating-forms) based on the field name, ensuring form repopulation is seamless.
- - **Automatic Form model binding**: Automatically binds to a model and populate the form with the corrisponding field
- **Livewire Support**: Fully integrate with Livewire by forwarding tags (e.g., `wire:model`) to the underlying input/select elements.

### Installation

[](#installation)

You can install the package via composer:

```
composer require tiknil/bs-blade-forms
```

JS/CSS assets should be automatically published alongside the default laravel libraries assets. Alternatively, publish them using:

```
php artisan vendor:publish --tag=bs-blade-forms:assets
```

Note

Boostrap is not imported automatically by the library. We assume you are already using it on your page and it is already available

### Usage

[](#usage)

The advanced select elements (SearchSelect / MultiSelect) requires some additional assets to be included. Add this between your page `head` tag:

```

    ...
    {{ BsBladeForms::assets() }}

```

In your blade templates, use the provided components:

```

```

#### Examples

[](#examples)

Go from:

```

    @csrf
    @method('patch')

    {{ __('user.name') }}

    {{ __('user.role') }}

        -- Select a role --
        @foreach($roles as $key => $label)
            role) === $key)
            >
            {{ $label }}

        @endforeach

        newsletter) === '1') />

            Subscribe to newsletter

```

To:

```

```

Components
----------

[](#components)

#### Form

[](#form)

Renders a form, with optional modal binding.

```

...

```

Automatically adds `@csrf` and `@method(...)` when required.

When a `model` is provided, `x-bs::` components will automatically use the model corresponding field as default value.

#### SearchSelect

[](#searchselect)

Renders a single selection element with a research bar for filtering the options.

```

```

Important

Include `{{ BsBladeForms::assets() }}` in the page head for this component to work

| Attribute | Type | Description | | ------------------ | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | | name | string | *Required*. Name of the select element | | options | array, Collection | The options to display on the select. | | fetch-url | string | An url to fetch for available options (to use with big data). The library will add a `q` querystring param with the searched string. Response should be a json in the `{ [value]: [label] }` format | | value | string, int | The initial selected value | | | required | bool | Set the select element as required (form can't be submitted without selection) | | | placeholder | string | Element placeholder when no option is selected | | label | string | If present, renders a `Label` above the element | | icon | string | If present, renders an `IconGroup` around the element | | allow-clear | bool | Allows the user to clear the selected option | | empty-value | string | The value to submit when no option is selected | | search-placeholder | string | The placeholder of the search input | | \* | | Additional attributes will be forwarded to the underlying element. |

#### Autocomplete

[](#autocomplete)

Renders an input field with dropdown suggestions that can be filtered by typing.

```

```

Important

Include `{{ BsBladeForms::assets() }}` in the page head for this component to work

| Attribute | Type | Description | | ----------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | | name | string | *Required*. Name of the select element | | options | array, Collection | The options to display in the dropdown. | | fetch-url | string | An url to fetch for available options (to use with big data). The library will add a `q` querystring param with the searched string. Response should be a json in the `{ [value]: [label] }` format | | value | string, int | The initial selected value | | | required | bool | Set the element as required (form can't be submitted without selection) | | | placeholder | string | Input placeholder text when no option is selected | | label | string | If present, renders a `Label` above the element | | icon | string | If present, renders an `IconGroup` around the element | | allow-clear | bool | Allows the user to clear the selected option | | empty-value | string | The value to submit when no option is selected | | \* | | Additional attributes will be forwarded to the underlying element. |

#### MultiSelect

[](#multiselect)

Renders a multiple selection element with a research bar for filtering the options.

```

```

Important

Include `{{ BsBladeForms::assets() }}` in the page head for this component to work

AttributeTypeDescriptionnamestring*Required*. Name of the select elementoptionsarray, CollectionThe options to display on the select.fetch-urlstringAn url to fetch for available options (to use with big data). The library will add a `q` querystring param with the searched string. Response should be a json in the `{ [value]: [label] }` formatvaluearrayThe initial selected valuesrequiredboolSet the select element as required (form can't be submitted without selection)placeholderstringElement placeholder when no option is selectedlabelstringIf present, renders a `Label` above the elementiconstringIf present, renders an `IconGroup` around the elementsearch-placeholderstringThe placeholder of the search inputselect-buttonsboolWhether or not to show "select all" and "unselect all" buttons (default true)\*Additional attributes will be forwarded to the underlying element.#### Select

[](#select)

```

```

| Attribute | Type | Description | | ------------ | ----------------- | --------------------------------------------------------------------------------------- | --- | | name | string | *Required*. Name of the select element | | options | array, Collection | The options to display on the select. | | value | string | The initial selected values | | | required | bool | Set the select element as required (form can't be submitted without selection) | | | label | string | If present, renders a `Label` above the element | | icon | string | If present, renders an `IconGroup` around the element | | empty-option | string | When present, an additional option with empty string as value is added with this label. | | \* | | Additional attributes will be forwarded to the underlying element. |

#### Input

[](#input)

```

```

AttributeTypeDescriptionnamestring*Required*. Name of the input elementvaluestringThe initial valuelabelstringIf present, renders a `Label` above the elementiconstringIf present, renders an `IconGroup` around the elementtypestringType of the input (`text` by default)\*Additional attributes will be forwarded to the underlying element.#### Textarea

[](#textarea)

```

```

| Attribute | Type | Description | | --------- | ------ | ------------------------------------------------------------------ | --- | | name | string | *Required*. Name of the textarea element | | value | string | The initial value | | | label | string | If present, renders a `Label` above the element | | \* | | Additional attributes will be forwarded to the underlying element. |

#### Checkbox

[](#checkbox)

```

enabled)
/>

```

Note

When the form is submitted, a parameter is submitted even when the checkbox is not checked! The parameter submitted has value `1` when the checkbox is checked, `0` otherwise

AttributeTypeDescriptionnamestring*Required*. Name of the elementlabelstringIf present, renders a `Label` aside the input checkboxcheckedboolInitial checked value (default `false`)valuestringThe value submitted when the checkbox is checked (default `1`)false-valuestringThe value submitted when the checkbox is not checked (default `0`)send-false-valueboolSend the false value when the checkbox is not checked (default `true`)\*Additional attributes will be forwarded to the underlying element.#### Radio

[](#radio)

```

contact_choice === 'email')
/>

```

AttributeTypeDescriptionnamestring*Required*. Name of the elementlabelstringIf present, renders a `Label` aside the input radiocheckedboolInitial checked value (default `false`)valuestringThe value submitted when the checkbox is checked\*Additional attributes will be forwarded to the underlying element.#### Label

[](#label)

All form components automatically include the `Label` component when the `label` attribute is present, but it can be used independently:

```

    User email

```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com), following the [laravelpackage.com](https://laravelpackage.com) documentation.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance84

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~56 days

Total

20

Last Release

83d ago

PHP version history (2 changes)0.1.0PHP ^8.1|^8.2|^8.3

0.4.0PHP ^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/369107c31af2371c739637d462c85da5fd4e88695e37c36cb2059efa88ab0471?d=identicon)[gbalduzzi](/maintainers/gbalduzzi)

---

Top Contributors

[![gbalduzzi](https://avatars.githubusercontent.com/u/4761858?v=4)](https://github.com/gbalduzzi "gbalduzzi (59 commits)")

---

Tags

tiknilbs-blade-forms

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/tiknil-bs-blade-forms/health.svg)

```
[![Health](https://phpackages.com/badges/tiknil-bs-blade-forms/health.svg)](https://phpackages.com/packages/tiknil-bs-blade-forms)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[illuminate/view

The Illuminate View package.

13044.9M1.7k](/packages/illuminate-view)[moonshine/moonshine

Laravel administration panel

1.3k217.1k59](/packages/moonshine-moonshine)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

703141.0k7](/packages/tallstackui-tallstackui)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[livewire/blaze

A tool for optimizing Blade component performance by folding them into parent templates

688221.3k17](/packages/livewire-blaze)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
