formic

formic seperate the sematic UI from the markup. It allows you to write code likes:

=form.create @dog, :id => 'my_dog' do
  =input.required 'name'
  =checkbox 'registered'
  =selection 'sex', :options => {'Male' => 'm', 'Female' => 'f'}

or

(tab.html.haml)

=tab_panel.fancy
  =tab "Tab Title Number One" do
    %p Some fancy Content here, can be whatever free style

  =tab.fancy "Tab Title Number Two", :id => 'tab_id' do
    %p Some other fancy content

Since formic seperate the markup and the sematic, you will need to define the markup yourself. Formic ships with default markup for each element in views/formic/default/*, but it is pretty minimal and it expects users to extend the markup as they like.

For example. I would extend my input markup to have a auto-generated id or classes. I can also rewrite my checkbox markup to be something else which is bigger and looks totally different (think mobile)

formic is in early stage of development thus currently lacking some essential features. These are the features will be implemented soon.

For example list.sortable might use markup views/formic/list/sortable.html.haml if it exists.

Contributing to formic

Copyright © 2010 Vinh Tran. See LICENSE.txt for further details.