Foundation Button
Button Styles
Foundation offers 6 button styles. The .button class creates a blue button with padding. Different color button classes include: .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>
Button classes can be used on <a>, <button>, or <input> elements:
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">
| | Why set the href of the a tag to #? <br>When we do not want the link to redirect and get a "404" <br>page, we can set the href of the a tag to #. | | --- | --- |
Button Sizes
We can use .large, .small, or .tiny classes to set button sizes:
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>
Rounded Buttons
We can use .radius and .round classes 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>
Expanded Buttons
We 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>
Disabled Buttons
We can use the .disabled class to set the button to be unclickable:
Example
<button type="button" class="button">Default Button</button><button
type="button" class="button disabled">Disabled Button</button>