Foundation Buttons
Button styles
Foundation provides 6 button styles. .button class creates a blue button with padding. The different button color classes are: .secondary, .success, .info, .warning or .alert:
Example
<
button
type=
"button"
class=
"button"
Default
<
/button
<
button
type=
"button"
class="button secondary"
Secondary
<
/button
<
button
type=
"button"
class="button success"
Success
<
/button
<
button
type=
"button"
class="button info"
Info
<
/button
<
button
type=
"button"
class="button warning"
Warning
<
/button
<
button
type=
"button"
class="button alert"
Alert
<
/button
Try it »
Button classes can be used on , , or element:
Example
<
a
href=
"#"
class="button info"
role=
"button"
Link Button
<
/a
<
button
type=
"button"
class="button info"
Button
<
/button
<
input
type=
"button"
class="button info"
value=
"Input Button"
<
input
type=
"submit"
class="button info"
value=
"Submit Button"
Try it »
|
| **Why set the href of the a tag to #?
**
When we don't want a link to navigate and get a \"404\" page, we can set the a tag's href to #. | | --- | --- |
Button sizes
We can use the .large, .small or .tiny class to set the button size:
Example
<
button
type=
"button"
class="button large"
Large
<
/button
<
button
type=
"button"
class=
"button"
Default
<
/button
<
button
type=
"button"
class="button small"
Small
<
/button
<
button
type=
"button"
class="button tiny"
Tiny
<
/button
Try it »
Rounded buttons
You can use the .radius and .round class to set rounded buttons:
Example
<
button
type=
"button"
class=
"button"Default Button
<
/button
<
button
type=
"button"
class="button radius"
Radius Button
<
/button
<
button
type=
"button"
class="button round"
Round Button
<
/button
Try it »
Stretched buttons
You can use the .expand class to set the button width to 100%:
Example
<
button
type=
"button"
class=
"button"Default Button
<
/button
<
button
type=
"button"
class="button expand"
Expanded Button
<
/button
Try it »
Disabled button
You can use the .disabled class to make the button unclickable:
Example
<
button
type=
"button"
class=
"button"Default Button
<
/button
<
button
type=
"button"
class="button disabled"
Disabled Button
<
/button
Try it »