form docs

Form

A collection of fieldset and inputs.

Published Last updated: 2.26.0 Change log Github NPM
Twig Usage
  {% extends "@bolt-components-form/form.twig" %}
{% set children %}
  {% set form_field %}
    {% include "@pl/10-form-element-demo-input-element.twig" with {
      title: "Email Address",
      inputAttributes: {
        placeholder: "Enter Email Address",
        required: true,
        type: "email"
      },
      labelDisplayType: "floating"
    } only %}
  {% endset %}
  {% set submit_button %}
    {% include "@bolt-components-form/form-button.twig" with {
      text: "Sign up now",
      tag: "submit"
    } only %}
  {% endset %}
{% endset %}
Schema
Note: when assigning component props as HTML attributes on a web component, make sure to use kebab-case.
Prop Name Description Type Default Value Option(s)
icon_size

Customize the size of the input icon used

medium
Install Install
  npm install @bolt/components-form
Dependencies @bolt/components-button @bolt/components-headline @bolt/components-icon @bolt/core-v3.x @bolt/lazy-queue
We promise not to sell your email address
The username you entered is already taken.

form element demo radio

Select an alignment

form element demo checkbox

Select toppings

If there were any server-side errors, you'd see them here
Pick at least two of the following

form element demo select

form element demo textarea

form full campaign landing

Get the Report

(all fields are required)

form inline inputs

Inline inputs: auto width

Use a bolt-list with display set to inline, and pass each input as an item. This will create an inline layout with multiple inputs. The width of each input will be adjusted to fit its content.

Inline inputs: flexible width

Use a bolt-list with display set to flex, and pass each input as an item. This will create a flexible layout with multiple inputs. The width of each input will be adjusted to the available space to fill up the full width of the layout.

form card theme variations

Get the Report

(all fields are required)

Get the Report

(all fields are required)

Get the Report

(all fields are required)

(Note: forms do not offically support dark themes yet. Use at your own risk.)