button.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  1. ---
  2. title: Button
  3. layout: documentation
  4. doc-tab: elements
  5. doc-subtab: button
  6. ---
  7. {% capture button_example %}
  8. <a class="button">Button</a>
  9. {% endcapture %}
  10. {% capture button_tags_example %}
  11. <a class="button">Anchor</a>
  12. <button class="button">Button</button>
  13. <input class="button" type="submit" value="Submit input">
  14. <input class="button" type="reset" value="Reset input">
  15. {% endcapture %}
  16. {% capture button_colors_a_example %}
  17. <a class="button is-white">White</a>
  18. <a class="button is-light">Light</a>
  19. <a class="button is-dark">Dark</a>
  20. <a class="button is-black">Black</a>
  21. <a class="button is-text">Text</a>
  22. {% endcapture %}
  23. {% capture button_colors_b_example %}
  24. <a class="button is-primary">Primary</a>
  25. <a class="button is-link">Link</a>
  26. <a class="button is-info">Info</a>
  27. <a class="button is-success">Success</a>
  28. <a class="button is-warning">Warning</a>
  29. <a class="button is-danger">Danger</a>
  30. {% endcapture %}
  31. {% capture button_sizes_example %}
  32. <a class="button is-small">Small</a>
  33. <a class="button">Normal</a>
  34. <a class="button is-medium">Medium</a>
  35. <a class="button is-large">Large</a>
  36. {% endcapture %}
  37. {% capture button_outlined_example %}
  38. <a class="button is-outlined">Outlined</a>
  39. <a class="button is-primary is-outlined">Outlined</a>
  40. <a class="button is-link is-outlined">Outlined</a>
  41. <a class="button is-info is-outlined">Outlined</a>
  42. <a class="button is-success is-outlined">Outlined</a>
  43. <a class="button is-danger is-outlined">Outlined</a>
  44. {% endcapture %}
  45. {% capture button_inverted_example %}
  46. <a class="button is-primary is-inverted">Inverted</a>
  47. <a class="button is-link is-inverted">Inverted</a>
  48. <a class="button is-info is-inverted">Inverted</a>
  49. <a class="button is-success is-inverted">Inverted</a>
  50. <a class="button is-danger is-inverted">Inverted</a>
  51. {% endcapture %}
  52. {% capture button_inverted_outlined_example %}
  53. <a class="button is-primary is-inverted is-outlined">Invert Outlined</a>
  54. <a class="button is-link is-inverted is-outlined">Invert Outlined</a>
  55. <a class="button is-info is-inverted is-outlined">Invert Outlined</a>
  56. <a class="button is-success is-inverted is-outlined">Invert Outlined</a>
  57. <a class="button is-danger is-inverted is-outlined">Invert Outlined</a>
  58. {% endcapture %}
  59. {% capture button_rounded_example %}
  60. <a class="button is-rounded">Rounded</a>
  61. <a class="button is-primary is-rounded">Rounded</a>
  62. <a class="button is-link is-rounded">Rounded</a>
  63. <a class="button is-info is-rounded">Rounded</a>
  64. <a class="button is-success is-rounded">Rounded</a>
  65. <a class="button is-danger is-rounded">Rounded</a>
  66. {% endcapture %}
  67. {% capture button_normal_example %}
  68. <a class="button">Normal</a>
  69. <a class="button is-primary">Normal</a>
  70. <a class="button is-link">Normal</a>
  71. <a class="button is-info">Normal</a>
  72. <a class="button is-success">Normal</a>
  73. <a class="button is-warning">Normal</a>
  74. <a class="button is-danger">Normal</a>
  75. {% endcapture %}
  76. {% capture button_hover_example %}
  77. <a class="button is-hovered">Hover</a>
  78. <a class="button is-primary is-hovered">Hover</a>
  79. <a class="button is-link is-hovered">Hover</a>
  80. <a class="button is-info is-hovered">Hover</a>
  81. <a class="button is-success is-hovered">Hover</a>
  82. <a class="button is-warning is-hovered">Hover</a>
  83. <a class="button is-danger is-hovered">Hover</a>
  84. {% endcapture %}
  85. {% capture button_focus_example %}
  86. <a class="button is-focused">Focus</a>
  87. <a class="button is-primary is-focused">Focus</a>
  88. <a class="button is-link is-focused">Focus</a>
  89. <a class="button is-info is-focused">Focus</a>
  90. <a class="button is-success is-focused">Focus</a>
  91. <a class="button is-warning is-focused">Focus</a>
  92. <a class="button is-danger is-focused">Focus</a>
  93. {% endcapture %}
  94. {% capture button_active_example %}
  95. <a class="button is-active">Active</a>
  96. <a class="button is-primary is-active">Active</a>
  97. <a class="button is-link is-active">Active</a>
  98. <a class="button is-info is-active">Active</a>
  99. <a class="button is-success is-active">Active</a>
  100. <a class="button is-warning is-active">Active</a>
  101. <a class="button is-danger is-active">Active</a>
  102. {% endcapture %}
  103. {% capture button_loading_example %}
  104. <a class="button is-loading">Loading</a>
  105. <a class="button is-primary is-loading">Loading</a>
  106. <a class="button is-link is-loading">Loading</a>
  107. <a class="button is-info is-loading">Loading</a>
  108. <a class="button is-success is-loading">Loading</a>
  109. <a class="button is-warning is-loading">Loading</a>
  110. <a class="button is-danger is-loading">Loading</a>
  111. {% endcapture %}
  112. {% capture button_static_example %}
  113. <span class="button is-static">Static</span>
  114. {% endcapture %}
  115. {% capture button_disabled_example %}
  116. <a class="button" title="Disabled button" disabled>Disabled</a>
  117. <a class="button is-primary" title="Disabled button" disabled>Disabled</a>
  118. <a class="button is-link" title="Disabled button" disabled>Disabled</a>
  119. <a class="button is-info" title="Disabled button" disabled>Disabled</a>
  120. <a class="button is-success" title="Disabled button" disabled>Disabled</a>
  121. <a class="button is-warning" title="Disabled button" disabled>Disabled</a>
  122. <a class="button is-danger" title="Disabled button" disabled>Disabled</a>
  123. {% endcapture %}
  124. {% capture button_fa_example %}
  125. <p class="field">
  126. <a class="button">
  127. <span class="icon is-small">
  128. <i class="fa fa-bold"></i>
  129. </span>
  130. </a>
  131. <a class="button">
  132. <span class="icon is-small">
  133. <i class="fa fa-italic"></i>
  134. </span>
  135. </a>
  136. <a class="button">
  137. <span class="icon is-small">
  138. <i class="fa fa-underline"></i>
  139. </span>
  140. </a>
  141. </p>
  142. <p class="field">
  143. <a class="button">
  144. <span class="icon">
  145. <i class="fa fa-github"></i>
  146. </span>
  147. <span>GitHub</span>
  148. </a>
  149. <a class="button is-primary">
  150. <span class="icon">
  151. <i class="fa fa-twitter"></i>
  152. </span>
  153. <span>Twitter</span>
  154. </a>
  155. <a class="button is-success">
  156. <span class="icon is-small">
  157. <i class="fa fa-check"></i>
  158. </span>
  159. <span>Save</span>
  160. </a>
  161. <a class="button is-danger is-outlined">
  162. <span>Delete</span>
  163. <span class="icon is-small">
  164. <i class="fa fa-times"></i>
  165. </span>
  166. </a>
  167. </p>
  168. <p class="field">
  169. <a class="button is-small">
  170. <span class="icon is-small">
  171. <i class="fa fa-github"></i>
  172. </span>
  173. <span>GitHub</span>
  174. </a>
  175. <a class="button">
  176. <span class="icon">
  177. <i class="fa fa-github"></i>
  178. </span>
  179. <span>GitHub</span>
  180. </a>
  181. <a class="button is-medium">
  182. <span class="icon">
  183. <i class="fa fa-github"></i>
  184. </span>
  185. <span>GitHub</span>
  186. </a>
  187. <a class="button is-large">
  188. <span class="icon is-medium">
  189. <i class="fa fa-github"></i>
  190. </span>
  191. <span>GitHub</span>
  192. </a>
  193. </p>
  194. {% endcapture %}
  195. {% capture button_only_icon_example %}
  196. <p class="field">
  197. <a class="button is-small">
  198. <span class="icon is-small">
  199. <i class="fa fa-header"></i>
  200. </span>
  201. </a>
  202. </p>
  203. <p class="field">
  204. <a class="button">
  205. <span class="icon is-small">
  206. <i class="fa fa-header"></i>
  207. </span>
  208. </a>
  209. <a class="button">
  210. <span class="icon">
  211. <i class="fa fa-header fa-lg"></i>
  212. </span>
  213. </a>
  214. </p>
  215. <p class="field">
  216. <a class="button is-medium">
  217. <span class="icon is-small">
  218. <i class="fa fa-header"></i>
  219. </span>
  220. </a>
  221. <a class="button is-medium">
  222. <span class="icon">
  223. <i class="fa fa-header fa-lg"></i>
  224. </span>
  225. </a>
  226. <a class="button is-medium">
  227. <span class="icon is-medium">
  228. <i class="fa fa-header fa-2x"></i>
  229. </span>
  230. </a>
  231. </p>
  232. <p class="field">
  233. <a class="button is-large">
  234. <span class="icon is-small">
  235. <i class="fa fa-header"></i>
  236. </span>
  237. </a>
  238. <a class="button is-large">
  239. <span class="icon">
  240. <i class="fa fa-header fa-lg"></i>
  241. </span>
  242. </a>
  243. <a class="button is-large">
  244. <span class="icon is-medium">
  245. <i class="fa fa-header fa-2x"></i>
  246. </span>
  247. </a>
  248. </p>
  249. {% endcapture %}
  250. {% capture button_group_example %}
  251. <div class="field is-grouped">
  252. <p class="control">
  253. <a class="button is-link">
  254. Save changes
  255. </a>
  256. </p>
  257. <p class="control">
  258. <a class="button">
  259. Cancel
  260. </a>
  261. </p>
  262. <p class="control">
  263. <a class="button is-danger">
  264. Delete post
  265. </a>
  266. </p>
  267. </div>
  268. {% endcapture %}
  269. {% capture button_addons_example %}
  270. <div class="field has-addons">
  271. <p class="control">
  272. <a class="button">
  273. <span class="icon is-small">
  274. <i class="fa fa-align-left"></i>
  275. </span>
  276. <span>Left</span>
  277. </a>
  278. </p>
  279. <p class="control">
  280. <a class="button">
  281. <span class="icon is-small">
  282. <i class="fa fa-align-center"></i>
  283. </span>
  284. <span>Center</span>
  285. </a>
  286. </p>
  287. <p class="control">
  288. <a class="button">
  289. <span class="icon is-small">
  290. <i class="fa fa-align-right"></i>
  291. </span>
  292. <span>Right</span>
  293. </a>
  294. </p>
  295. </div>
  296. {% endcapture %}
  297. {% capture button_group_addons_example %}
  298. <div class="field has-addons">
  299. <p class="control">
  300. <a class="button">
  301. <span class="icon is-small">
  302. <i class="fa fa-bold"></i>
  303. </span>
  304. <span>Bold</span>
  305. </a>
  306. </p>
  307. <p class="control">
  308. <a class="button">
  309. <span class="icon is-small">
  310. <i class="fa fa-italic"></i>
  311. </span>
  312. <span>Italic</span>
  313. </a>
  314. </p>
  315. <p class="control">
  316. <a class="button">
  317. <span class="icon is-small">
  318. <i class="fa fa-underline"></i>
  319. </span>
  320. <span>Underline</span>
  321. </a>
  322. </p>
  323. </div>
  324. <div class="field has-addons">
  325. <p class="control">
  326. <a class="button">
  327. <span class="icon is-small">
  328. <i class="fa fa-align-left"></i>
  329. </span>
  330. <span>Left</span>
  331. </a>
  332. </p>
  333. <p class="control">
  334. <a class="button">
  335. <span class="icon is-small">
  336. <i class="fa fa-align-center"></i>
  337. </span>
  338. <span>Center</span>
  339. </a>
  340. </p>
  341. <p class="control">
  342. <a class="button">
  343. <span class="icon is-small">
  344. <i class="fa fa-align-right"></i>
  345. </span>
  346. <span>Right</span>
  347. </a>
  348. </p>
  349. </div>
  350. {% endcapture %}
  351. {% capture buttons %}
  352. <div class="buttons">
  353. <span class="button is-success">Save changes</span>
  354. <span class="button is-info">Save and continue</span>
  355. <span class="button is-danger">Cancel</span>
  356. </div>
  357. {% endcapture %}
  358. {% capture buttons_multiple %}
  359. <div class="buttons">
  360. <span class="button">One</span>
  361. <span class="button">Two</span>
  362. <span class="button">Three</span>
  363. <span class="button">Four</span>
  364. <span class="button">Five</span>
  365. <span class="button">Six</span>
  366. <span class="button">Seven</span>
  367. <span class="button">Eight</span>
  368. <span class="button">Nine</span>
  369. <span class="button">Ten</span>
  370. <span class="button">Eleven</span>
  371. <span class="button">Twelve</span>
  372. <span class="button">Thirteen</span>
  373. <span class="button">Fourteen</span>
  374. <span class="button">Fifteen</span>
  375. <span class="button">Sixteen</span>
  376. <span class="button">Seventeen</span>
  377. <span class="button">Eighteen</span>
  378. <span class="button">Nineteen</span>
  379. <span class="button">Twenty</span>
  380. </div>
  381. {% endcapture %}
  382. {% capture buttons_addons %}
  383. <div class="buttons has-addons">
  384. <span class="button">Yes</span>
  385. <span class="button">Maybe</span>
  386. <span class="button">No</span>
  387. </div>
  388. {% endcapture %}
  389. {% capture buttons_addons_centered %}
  390. <div class="buttons has-addons is-centered">
  391. <span class="button">Yes</span>
  392. <span class="button">Maybe</span>
  393. <span class="button">No</span>
  394. </div>
  395. {% endcapture %}
  396. {% capture buttons_addons_right %}
  397. <div class="buttons has-addons is-right">
  398. <span class="button">Yes</span>
  399. <span class="button">Maybe</span>
  400. <span class="button">No</span>
  401. </div>
  402. {% endcapture %}
  403. {% capture buttons_addons_selected %}
  404. <div class="buttons has-addons">
  405. <span class="button is-success is-selected">Yes</span>
  406. <span class="button">Maybe</span>
  407. <span class="button">No</span>
  408. </div>
  409. <div class="buttons has-addons">
  410. <span class="button">Yes</span>
  411. <span class="button is-info is-selected">Maybe</span>
  412. <span class="button">No</span>
  413. </div>
  414. <div class="buttons has-addons">
  415. <span class="button">Yes</span>
  416. <span class="button">Maybe</span>
  417. <span class="button is-danger is-selected">No</span>
  418. </div>
  419. {% endcapture %}
  420. {% include subnav-elements.html %}
  421. <section class="section">
  422. <div class="container">
  423. <h1 class="title">Buttons</h1>
  424. <h2 class="subtitle">
  425. The classic <strong>button</strong>, in different colors, sizes, and states
  426. </h2>
  427. {%
  428. include meta.html
  429. colors=true
  430. sizes=true
  431. variables=true
  432. %}
  433. <hr>
  434. <div class="content">
  435. <p>
  436. The <strong>button</strong> is an essential element of any design. It's meant to look and behave as an <strong>interactive</strong> element of your page.
  437. </p>
  438. </div>
  439. {% include snippet.html content=button_example %}
  440. <div class="content">
  441. <p>
  442. The <code>.button</code> class can be used on:
  443. </p>
  444. <ul>
  445. <li>
  446. <code>&lt;a&gt;</code> anchor links
  447. </li>
  448. <li>
  449. <code>&lt;button&gt;</code> form buttons
  450. </li>
  451. <li>
  452. <code>&lt;input type="submit"&gt;</code> submit inputs
  453. </li>
  454. <li>
  455. <code>&lt;input type="reset"&gt;</code> reset inputs
  456. </li>
  457. </ul>
  458. </div>
  459. {% include snippet.html content=button_tags_example %}
  460. {% include anchor.html name="Colors" %}
  461. {% include snippet.html content=button_colors_a_example %}
  462. {% include snippet.html content=button_colors_b_example %}
  463. {% include anchor.html name="Sizes" %}
  464. {% include snippet.html content=button_sizes_example %}
  465. {% include anchor.html name="Styles" %}
  466. <h4 class="subtitle">Outlined</h4>
  467. {% include snippet.html content=button_outlined_example %}
  468. <h4 class="subtitle">Inverted (the text color becomes the background color, and vice-versa)</h4>
  469. <div class="columns">
  470. <div class="column">
  471. <div class="bd-callout is-primary">
  472. {{button_inverted_example}}
  473. </div>
  474. </div>
  475. <div class="column">
  476. {% highlight html %}{{button_inverted_example}}{% endhighlight %}
  477. </div>
  478. </div>
  479. <h4 class="subtitle">Invert Outlined (the invert color becomes the text and border colors)</h4>
  480. <div class="columns">
  481. <div class="column">
  482. <div class="bd-callout is-primary">
  483. {{button_inverted_outlined_example}}
  484. </div>
  485. </div>
  486. <div class="column">
  487. {% highlight html %}{{button_inverted_outlined_example}}{% endhighlight %}
  488. </div>
  489. </div>
  490. <h4 class="subtitle">Rounded buttons</h4>
  491. <div class="columns">
  492. <div class="column">
  493. {% include elements/new-tag.html version="0.6.2" %}
  494. {{ button_rounded_example }}
  495. </div>
  496. <div class="column">
  497. {% highlight html %}{{ button_rounded_example }}{% endhighlight %}
  498. </div>
  499. </div>
  500. {% include anchor.html name="States" %}
  501. <h4 class="subtitle">Normal</h4>
  502. {% include snippet.html content=button_normal_example %}
  503. <h4 class="subtitle">Hover</h4>
  504. {% include snippet.html content=button_hover_example %}
  505. <h4 class="subtitle">Focus</h4>
  506. {% include snippet.html content=button_focus_example %}
  507. <h4 class="subtitle">Active</h4>
  508. {% include snippet.html content=button_active_example %}
  509. <h4 class="subtitle">Loading</h4>
  510. <div class="columns">
  511. <div class="column">
  512. <div class="block">
  513. {{button_loading_example}}
  514. </div>
  515. <div class="message is-info">
  516. <div class="message-body">
  517. <p>
  518. Since the loading spinner is implemented using the <code>:after</code> pseudo-element, it is not supported by the <code>&lt;input type="submit"&gt;</code> element.
  519. </p>
  520. </div>
  521. </div>
  522. </div>
  523. <div class="column">
  524. {% highlight html %}{{button_loading_example}}{% endhighlight %}
  525. </div>
  526. </div>
  527. <h4 id="static-button" class="subtitle">
  528. Static
  529. </h4>
  530. <div class="columns">
  531. <div class="column">
  532. <div class="content">
  533. <p>
  534. You can create a <strong>non-interactive button</strong> by using the <code>is-static</code> modifier. This is useful to align a text label with an input, for example when using <a href="{{site.url}}/documentation/form/general#form-addons">form addons</a>.
  535. </p>
  536. </div>
  537. {{button_static_example}}
  538. </div>
  539. <div class="column">
  540. {% highlight html %}{{button_static_example}}{% endhighlight %}
  541. </div>
  542. </div>
  543. <h4 class="subtitle">Disabled</h4>
  544. <div class="columns">
  545. <div class="column">
  546. <div class="block">
  547. {{button_disabled_example}}
  548. </div>
  549. <div class="message is-danger">
  550. <div class="message-body">
  551. <p>The <code>is-disabled</code> CSS class has been deprecated in favor of the <code>disabled</code> HTML attribute. <a href="https://github.com/jgthms/bulma/issues/276">Learn more</a></p>
  552. </div>
  553. </div>
  554. </div>
  555. <div class="column">
  556. {% highlight html %}{{button_disabled_example}}{% endhighlight %}
  557. </div>
  558. </div>
  559. <h4 class="subtitle">With Font Awesome icons</h4>
  560. {% include snippet.html content=button_fa_example clipped=true %}
  561. <div class="columns">
  562. <div class="column">
  563. <div class="content">
  564. <p>
  565. If the button only contains an icon, Bulma will make sure the button remains <strong>square</strong>, no matter the size of the button <em>or</em> of the icon.
  566. </p>
  567. </div>
  568. {{button_only_icon_example}}
  569. </div>
  570. <div class="column">
  571. {% highlight html %}{{button_only_icon_example}}{% endhighlight %}
  572. </div>
  573. </div>
  574. {% include anchor.html name="Button group" %}
  575. <div class="content">
  576. <p>If you want to <strong>group</strong> buttons together on a <strong>single line</strong>, use the <code>is-grouped</code> modifier on the <code>field</code> container:</p>
  577. </div>
  578. {% include snippet.html content=button_group_example %}
  579. {% include anchor.html name="Button addons" %}
  580. <div class="content">
  581. <p>If you want to use buttons as <strong>addons</strong>, use the <code>has-addons</code> modifier on the <code>field</code> container:</p>
  582. </div>
  583. {% include snippet.html content=button_addons_example %}
  584. {% include anchor.html name="Button group with addons" %}
  585. <div class="content">
  586. <p>You can group together addons as well:</p>
  587. </div>
  588. {% include snippet.html content=button_group_addons_example %}
  589. {% include anchor.html name="List of buttons" %}
  590. {% include elements/new-tag.html version="0.6.1" %}
  591. <div class="columns">
  592. <div class="column">
  593. <div class="content">
  594. <p>
  595. You can now create a <strong>list of buttons</strong> with the <code>.buttons</code> container.
  596. </p>
  597. </div>
  598. <div class="bd-example">
  599. {{ buttons }}
  600. </div>
  601. </div>
  602. <div class="column">
  603. {% highlight html %}{{ buttons }}{% endhighlight %}
  604. </div>
  605. </div>
  606. <div class="columns">
  607. <div class="column">
  608. <div class="content">
  609. <p>
  610. If the list is <strong>very long</strong>, it will automatically wrap on <strong>multiple lines</strong>, while keeping all buttons <strong>evenly spaced</strong>.
  611. </p>
  612. </div>
  613. <div class="bd-example">
  614. {{ buttons_multiple }}
  615. </div>
  616. </div>
  617. <div class="column highlight-full">
  618. {% highlight html %}{{ buttons_multiple }}{% endhighlight %}
  619. </div>
  620. </div>
  621. <div class="columns">
  622. <div class="column">
  623. <div class="content">
  624. <p>
  625. You can <strong>attach buttons together</strong> with the <code>.has-addons</code> modifier.
  626. </p>
  627. </div>
  628. <div class="bd-example">
  629. {{ buttons_addons }}
  630. </div>
  631. </div>
  632. <div class="column highlight-full">
  633. {% highlight html %}{{ buttons_addons }}{% endhighlight %}
  634. </div>
  635. </div>
  636. <div class="columns">
  637. <div class="column">
  638. <div class="content">
  639. <p>
  640. Use the <code>is-centered</code> or the <code>is-right</code> modifiers to alter the <strong>alignment</strong>.
  641. </p>
  642. </div>
  643. <div class="bd-example">
  644. {{ buttons_addons_centered }}
  645. {{ buttons_addons_right }}
  646. </div>
  647. </div>
  648. <div class="column highlight-full">
  649. {% highlight html %}{{ buttons_addons_centered }}{{ buttons_addons_right }}{% endhighlight %}
  650. </div>
  651. </div>
  652. <div class="columns">
  653. <div class="column">
  654. <div class="content">
  655. <p>
  656. You can use any <strong>modifier</strong> class on each button to differentiate them. Make sure to add the <code>is-selected</code> modifier as well to make sure the selected button is <em>above</em> its siblings.
  657. </p>
  658. </div>
  659. <div class="bd-example">
  660. {{ buttons_addons_selected }}
  661. </div>
  662. </div>
  663. <div class="column highlight-full">
  664. {% highlight html %}{{ buttons_addons_selected }}{% endhighlight %}
  665. </div>
  666. </div>
  667. <div class="message is-info">
  668. <div class="message-header">
  669. <p>Difference between <a href="{{ site.url }}/documentation/form/general/#form-group">form groups</a> and <strong>list of buttons</strong></p>
  670. </div>
  671. <div class="message-body">
  672. <div class="content">
  673. <p>
  674. While this list of buttons style can be achieved with either <code>field is-grouped</code> or the new <code>buttons</code> class, there are a few differences:
  675. </p>
  676. <ul>
  677. <li>
  678. <code>buttons</code> has a <strong>simpler markup</strong>
  679. </li>
  680. <li>
  681. <code>buttons</code> can only contain <code>button</code> elements
  682. </li>
  683. <li>
  684. <code>field is-grouped</code> can contain <em>any</em> type of <code>control</code> inputs
  685. </li>
  686. <li>
  687. <code>field is-grouped</code> can be forced to fit all controls on a <strong>single line</strong>
  688. </li>
  689. <li>
  690. with <code>field is-grouped</code> you can <strong>expand</strong> one of the controls
  691. </li>
  692. </ul>
  693. <p>
  694. Basically, if you only want a list of <em>buttons</em>, using <code>buttons</code> is recommended. If you need more control on the styling and the elements, use a <a href="{{ site.url }}/documentation/form/general/#form-group">form group</a>.
  695. </p>
  696. </div>
  697. </div>
  698. </div>
  699. {% include variables.html type='element' %}
  700. </div>
  701. </section>