Skip to main content

Elements · Forms

A showcase of the Fancy Bricks form styles on the Bricks Form element: boxed, underline, floating label, floating label with underline, phone with country code and a one-row newsletter, on light and dark.

Elements · Forms

Full-page views: desktop, phone and dark mode

Elements · Forms, desktop at 1440px wide

At 1440px wide.

Elements · Forms, on a phone at 390px wide

At 390px wide.

Elements · Forms, with the site in dark mode

With your site in dark mode.

See it live: Elements · Forms on fancybricks.co — the live preview, and the button that copies it.

Structure​

This is what the Bricks Structure panel shows after you paste the template. Component instances say which component they are.

Forms showcase
Forms · Light
Container
Intro (FBK Intro)
Examples
Example · Boxed (fbk-form)
Label
Form · Boxed light
Example · Underline (fbk-form--line)
Label
Form · Underline light
Example · Floating label (fbk-form--float)
Label
Form · Floating light
Example · Floating label + underline
Label
Form · Floating underline light
Example · Phone with country code
Label
Form · Phone light
Example · In one row: newsletter (fbk-form--inline)
Label
Form · Newsletter light
Forms · Dark
Container
Intro (FBK Intro)
Examples
Example · Boxed (fbk-form)
Label
Form · Boxed dark
Example · Underline (fbk-form--line)
Label
Form · Underline dark
Example · Floating label (fbk-form--float)
Label
Form · Floating dark
Example · Floating label + underline
Label
Form · Floating underline dark
Example · Phone with country code
Label
Form · Phone dark
Example · In one row: newsletter (fbk-form--inline)
Label
Form · Newsletter dark

The template also pastes a dashed note above the section, with the short version of this page. It only shows inside the builder, never on the published page — see Builder notes.

How to adjust​

Every step is the same move: pick the element in the Structure panel, change its Properties.

Where are those panels?

How to adjust a template shows every one of them in a screenshot of the real builder: the Structure and Properties panels, the classes on an element, a component's style families and the field where a CSS variable goes.

The classes this element carries, in the Bricks panel.

The classes this element carries, in the Bricks panel.

This template's own component, with its Style group open.

This template's own component, with its Style group open.

  1. Paste the template in Bricks first — see Copy and paste.
  2. Select Intro ×2 (FBK Intro) › Properties: Eyebrow, Hide eyebrow, Title, Title level, Lead, Hide lead · Style group: Eyebrow style, Highlight, Title size, Accent line · Layout group: Alignment, Layout, Background, Spacing · Motion group: Reveal in slider.
  3. Select Form · Boxed light, Form · Underline light, Form · Floating light (+9 more) › Content › Fields (add, remove, required), Submit button and Actions (Email: recipient and subject; success message).

Finish by hand​

  • To use a style, copy a form into your page, or add the class to your own Form element: fbk-form (boxed), plus fbk-form--line (underline), fbk-form--float (floating label) or fbk-form--inline (one row). Line and float can be combined.
  • Floating label: every text field needs a placeholder (it shows once the field has focus); without one the label simply stays up. Keep Show labels on: the label is what screen readers read.
  • Field widths are in each field's settings (Width %): two fields at 50 % share a row. The space between them is --fbk-form-col-gap on .fbk-form.
  • Colors, sizes and the gap between fields are variables at the top of .fbk-form (Style

    CSS): --fbk-form-field-bg, --fbk-form-field-border, --fbk-form-gap, --fbk-form-label-size… On a dark or brand section the fields adapt by themselves; on your own dark block add fbk-scheme fbk-scheme--dark.

  • Every field type is styled: radio buttons and checkboxes in the field colors (the button color when checked), the file field as a dashed frame, the date with Bricks' datepicker. Errors: write an Error message in each field and turn on Don't use browser validation and Validate all fields on submit in the Form element, as in these demos; the message shows under the field and the border turns to --fbk-form-error (Bricks' own red by default).
  • The submit button looks like FBK Button and follows the same choices: add fbk-form--btn-secondary, --btn-outline, --btn-white or --btn-white-outline for its style and fbk-form--btn-s or --btn-l for its size, next to fbk-form. Its hover is FBK Button's Sweep, the class fbk-form--sweep (remove it for a plain color change). Full width: Submit button > Width in the Form element.
  • The demo forms use the Bricks Email action (to the site admin). Set your own actions, subject and messages in the Form element.

On phones​

The template is designed desktop first, the Bricks default, and only changes at the two widths the library uses:

  • 991px and below — .fbk-intro.
  • 767px and below — .fbk-section.

Those changes live in Bricks' own breakpoint fields, so you edit them where you always do: pick the breakpoint in the toolbar and the same fields follow.

Careful with the classes shared by the whole library (fbk-section, fbk-intro, the component classes): a change there shows up in every template that uses them.

If your site's breakpoints are set up mobile first, copy the mobile-first variant of the template instead — see Copy and paste.

Accessibility​

In this template, keyboard focus is visible on every interactive piece; movement is cut back when the visitor's system asks for less motion.

What is checked on every template, and what depends on your own palette: Accessibility.

Dark mode​

With your site in dark mode this section turns dark too — the class fbk-section--auto-dark on the section does it. Remove the class to keep it light.

Its background is a modifier on the section, so you can swap it for any of the ones the template is checked with: fbk-section--soft, fbk-section--dark.

How the library follows your site's color scheme: Dark mode and preview.

Replaces​

  • Contact Form - Phone with country selector from Fancy Bricks 2.0

What happened to the old libraries, and what to do with pages already built with them: Migrating from 1.0/2.0.