Module: Ui

Defined in:
app/helpers/ui/fomantic_form_builder.rb,
lib/ui.rb,
lib/ui/engine.rb,
lib/ui/version.rb,
lib/rails_active_ui.rb,
app/controllers/ui/examples_controller.rb

Overview

FomanticFormBuilder

A Rails FormBuilder wrapping every helper in Fomantic-UI markup.

All text-like input helpers (text_field, email_field, password_field, etc.) render a bare element by default. Pass field: true to wrap the input in a Fomantic

with optional label, error, hint.

Usage:

# Bare input (no wrapper):
TextField(:email, placeholder: "E-mail address")

# Wrapped in <div class="field"> with auto-label:
TextField(:email, field: true)

# Inside an Input wrapper for icon styling:
Input(icon: "user", icon_position: "left") {
TextField(:email, placeholder: "E-mail address")
}

Field options (only used when field: true):

label:        String  

Defined Under Namespace

Classes: Engine, ExamplesController, FomanticFormBuilder

Constant Summary collapse

VERSION =
"0.4.0"