PHPackages                             sirvoy/twig-bulma-form-theme-bundle - 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. sirvoy/twig-bulma-form-theme-bundle

ActiveLibrary

sirvoy/twig-bulma-form-theme-bundle
===================================

A Twig Form Theme for Bulma for use with Symfony

32859↑130.8%12Twig

Since May 18Pushed 2y ago5 watchersCompare

[ Source](https://github.com/dsmink/twig-bulma-form-theme-bundle)[ Packagist](https://packagist.org/packages/sirvoy/twig-bulma-form-theme-bundle)[ RSS](/packages/sirvoy-twig-bulma-form-theme-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

twig-bulma-form-theme
=====================

[](#twig-bulma-form-theme)

A Twig 3.x Form Theme for Bulma 0.9.x for use with Symfony 5/6 framework

---

Twig (3.x) Bulma (v0.9.x) Form theme
====================================

[](#twig-3x-bulma-v09x-form-theme)

Bulma is a modern CSS framework based on Flexbox. This form theme was created for use with the Twig Template engine. Twig is a modern template engine for PHP.

This form theme was built to work with Twig in combination with the Symfony Framework for websites built on top of the Bulma CSS framework.

Index
-----

[](#index)

- [How to use the form theme](#how-to-use-the-form-theme)
- [Icon support](#icon-support)
- [Examples](#examples)
- [Sources](#sources)

### How to use the form theme:

[](#how-to-use-the-form-theme)

The easiest way to make use of the form theme in Symfony is to set this form theme in the configuration file. Have a look at the [Symfony documentation](https://symfony.com/doc/current/form/form_customization.html#making-application-wide-customizations). Also example files are provided in this repository.

### Icon support:

[](#icon-support)

The theme also supports the use of icons. Bulma comes with support for the Font Awesome icon toolkit. It's realy easy to make a form widget support these themes with Symfony Form Type Extensions. An example Form Type Extension is provided within the examples directory in this repository.

Examples
--------

[](#examples)

### widget sizes:

[](#widget-sizes)

Widget size can be set by just using a classname. The following example is for use with the Symfony Form Type.

```
$builder->add('firstname', TextType::class, [
    'attr' => [
        'class' => 'is-large'
    ],
    ...
]);
```

[![Selectbox size example](https://raw.githubusercontent.com/dsmink/twig-bulma-form-theme/master/doc/images/sizes.png)](https://raw.githubusercontent.com/dsmink/twig-bulma-form-theme/master/doc/images/sizes.png)

> **NOTE**
>
> The default size needs no extra class. Suppoted sizes are **is-small**, **is-medium** and **is-large**.

### Icons:

[](#icons)

The following example is for use with the Symfony Form Type. This example is based on the Form Type Extension provided in the documentation examples directory.

```
$builder
    // Username widget with user icon
    ->add('username', TextType::class, [
	    'bulma_icon' => [
            'icon' => 'user',
            'position' => 'left',
        ],
        ...
    ])
    // Password widget with lock icon
    ->add('password', PasswordType::class, [
        'bulma_icon' => [
            'icon' => 'lock',
            'position' => 'left',
        ],
        ...
    ])
;
```

[![Username and password widgets with icons](https://raw.githubusercontent.com/dsmink/twig-bulma-form-theme/master/doc/images/username_password.png)](https://raw.githubusercontent.com/dsmink/twig-bulma-form-theme/master/doc/images/username_password.png)

> **Need more icons?**
>
> Have a look at the bulma.io and fontawesome.io website to find out which icons are available and how to implement them.

### Dropdown with ChoiceType:

[](#dropdown-with-choicetype)

The following example is for use with the Symfony Form Type 'ChoiceType'

```
->add('checkbox_dropdown', Type\ChoiceType::class, [
    'choices' => [
        // choice groups are supported (including 'group_by' method)
        'Group header 1' => [
            'Checkbox 1' => 1,
            'Checkbox 2' => 2,
        ],
        'Group header 2' => [
            'Checkbox 3' => 3,
            'Checkbox 4' => 4,
        ],
    ],
    'label' => false, // = don't render top label (trigger button label is always rendered)
    'expanded' => true, // required to use dropdown
    'multiple' => true, // true = checkboxes, false = radio buttons
    'attr' => [
        'dropdown' => true, // required to use dropdown
        'dropdown_arrow_icon' => false, // default to true
        'class' => 'is-rounded is-outlined', // added to dropdown trigger button
    ],
])
```

Render it inside a form:

```

{{ form_row(form.checkbox_dropdown) }}

    {{ form_label(form.checkbox_dropdown) }}

        {{ form_widget(form.checkbox_dropdown) }}

```

[![Dropdown with ChoiceType](doc/images/choice_type_dropdown.png)](doc/images/choice_type_dropdown.png)

Add this styling if you need a scrollbar on your dropdowns

```
.dropdown-content {
  max-height: 25rem;
  overflow-y: auto;
}
```

Sources
-------

[](#sources)

Have a look at the following websites and their documentation for more information about this subject.

- The [Bulma](http://bulma.io/) CSS framework website;
- The [Font Awesome](http://fontawesome.io/) font and CSS toolkit;
- The [Twig](http://twig.symfony.com/) Template engine for PHP website;
- The [Symfony](http://symfony.com/) PHP framework website.

###  Health Score

24

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f4c4153f46fe0bd6ba1b46dfa1f3b65af24dcad60fa4b4c73b21d0f13ea7714?d=identicon)[dsmink](/maintainers/dsmink)

---

Top Contributors

[![dsmink](https://avatars.githubusercontent.com/u/11163937?v=4)](https://github.com/dsmink "dsmink (21 commits)")[![Alexander-Jordan](https://avatars.githubusercontent.com/u/68730459?v=4)](https://github.com/Alexander-Jordan "Alexander-Jordan (18 commits)")[![johanwilfer](https://avatars.githubusercontent.com/u/1157420?v=4)](https://github.com/johanwilfer "johanwilfer (4 commits)")[![Monkfish-FR](https://avatars.githubusercontent.com/u/35693726?v=4)](https://github.com/Monkfish-FR "Monkfish-FR (2 commits)")[![ferdynator](https://avatars.githubusercontent.com/u/3531327?v=4)](https://github.com/ferdynator "ferdynator (1 commits)")[![a-wojcik](https://avatars.githubusercontent.com/u/117715037?v=4)](https://github.com/a-wojcik "a-wojcik (1 commits)")[![Woutwo](https://avatars.githubusercontent.com/u/1227599?v=4)](https://github.com/Woutwo "Woutwo (1 commits)")

---

Tags

bulma-cssformssymfonytwig

### Embed Badge

![Health badge](/badges/sirvoy-twig-bulma-form-theme-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/sirvoy-twig-bulma-form-theme-bundle/health.svg)](https://phpackages.com/packages/sirvoy-twig-bulma-form-theme-bundle)
```

PHPackages © 2026

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