Formsnap

Overview

Styling

Easily style the various parts of your forms.

We apply data attributes to the various parts of your form so that you can easily style them using those attributes as selectors.

Here are a list of the attributes that are applied to the various parts of your form:

  • data-fs-error - Applied to all the formsnap components within a field if the field has an error. Using this attribute, you can customize the appearance of the input, label, etc. when the field has a validation error.
  • data-fs-label - Applied to the <Form.Label /> component.
  • data-fs-input - Applied to the <Form.Input /> component.
  • data-fs-textarea - Applied to the <Form.Textarea /> component.
  • data-fs-select - Applied to the <Form.Select /> component.
  • data-fs-checkbox - Applied to the <Form.Checkbox /> component.
  • data-fs-radio - Applied to the <Form.Radio /> component.
  • data-fs-validation - Applied to the <Form.Validation /> component.
  • data-fs-description - Applied to the <Form.Description /> component.