button.html 22 KB

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