Button anchor
This module allow you to deal with simple or complex buttons rendering.
See the button doc reference
Let's create a simple one:
Html::button('#anchor', 'My simple button')
My simple buttonMaybe one of the most important module, Button is simply a Fuelphp anchor's, with attributes under steroids.
Thestatus:
Html::button('#', 'primary', array('status' => 'primary'))
primary inverse info success warning danger
The
icon in conjonction with icon-pos let's you respectivly add a icon, and put it on the left or right:
Html::button('#', 'Account', array('icon' => 'user'))
Html::button('#', 'Account', array('icon' => 'user', 'icon-pos' => 'right'))
Left Right
The
size attribute define the how big it will be: mini, small, large:
Html::button('#anchor', 'Mini button', array('size' => 'mini'))
Mini Small Large
The
state attribute define the button state, active or disabled:
Html::button('#', 'Active button', array('state' => 'active'))
// or
Html::button('#', 'Active button')->active()
Html::button('#', 'Disabled button', array('state' => 'disabled'))
// or
Html::button('#', 'Disabled button')->disabled()
Active button Disabled button
Attach a
loading text to use with Javascript button states:
Html::button('#anchor', 'Click me')->loading('Loading...')
// or
Html::button('#anchor', 'Click me', array('loading' => 'Loading...'))
Click me
Attach a
toggle state to use with Javascript button states:
Html::button('#anchor', 'Click me')->toggle() // true or false, true if no parameter
// or
Html::button('#anchor', 'Click me', array('toggle' => true))
Click meA complex example
Html::button('#', 'ClickMe', array(
'status'=> 'danger',
'icon' => 'fire',
'size' => 'large',
'toggle'=> true)
)->popover('Hey !', 'I have something to say', array('placement' => 'top'))
ClickMe