123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863 |
- ---
- title: Buttons
- description: Use button styles that best suit your designs and encourage users to take the desired actions. You can customize the button's properties to improve the user experience of your website or system, changing the size, shape, color and many more.
- bootstrapLink: components/buttons/
- ---
- ## Button tag
- As one of the most common elements of UI design, buttons have a very important function of engaging users with your website or app and guiding them in their actions. Use the `.btn` classes with the `<button>` element and add additional styling that will make your buttons serve their purpose and draw users' attention.
- ```html example code centered separated height="7rem"
- <a href="#" class="btn" role="button">Link</a>
- <button class="btn">Button</button>
- <input type="button" class="btn" value="Input" />
- <input type="submit" class="btn" value="Submit" />
- <input type="reset" class="btn" value="Reset" />
- ```
- ## Default button
- The standard button creates a white background and subtle hover animation. It's meant to look and behave as an interactive element of your page.
- ```html example code centered separated height="7rem"
- <a href="#" class="btn" role="button">Link</a>
- ```
- ## Button variations
- Use the button classes that correspond to the function of your button. The big range of available colors will help you show your buttons' purpose and make them easy to spot.
- ```html code example vertical centered separated scrollable height="15rem"
- <a href="#" class="btn btn-primary">Primary</a>
- <a href="#" class="btn btn-secondary">Secondary</a>
- <a href="#" class="btn btn-success">Success</a>
- <a href="#" class="btn btn-warning">Warning</a>
- <a href="#" class="btn btn-danger">Danger</a>
- <a href="#" class="btn btn-info">Info</a>
- <a href="#" class="btn btn-dark">Dark</a>
- <a href="#" class="btn btn-light">Light</a>
- ```
- ## Disabled buttons
- Make buttons look inactive to show that an action is possible once the user meets certain criteria, such as completing the required fields to submit a form.
- ```html code example vertical centered separated scrollable height="15rem"
- <a href="#" class="btn btn-primary disabled">Primary</a>
- <a href="#" class="btn btn-secondary disabled">Secondary</a>
- <a href="#" class="btn btn-success disabled">Success</a>
- <a href="#" class="btn btn-warning disabled">Warning</a>
- <a href="#" class="btn btn-danger disabled">Danger</a>
- <a href="#" class="btn btn-info disabled">Info</a>
- <a href="#" class="btn btn-dark disabled">Dark</a>
- <a href="#" class="btn btn-light disabled">Light</a>
- ```
- ## Color variations
- Choose the right color for your button to make it go well with your design and draw users' attention. Button colors can have a big influence on users' decisions, which is why it's important to choose them based on the intended purpose.
- ```html code example vertical centered separated scrollable height="15rem"
- <a href="#" class="btn btn-blue">Blue</a>
- <a href="#" class="btn btn-azure">Azure</a>
- <a href="#" class="btn btn-indigo">Indigo</a>
- <a href="#" class="btn btn-purple">Purple</a>
- <a href="#" class="btn btn-pink">Pink</a>
- <a href="#" class="btn btn-red">Red</a>
- <a href="#" class="btn btn-orange">Orange</a>
- <a href="#" class="btn btn-yellow">Yellow</a>
- <a href="#" class="btn btn-lime">Lime</a>
- <a href="#" class="btn btn-green">Green</a>
- <a href="#" class="btn btn-teal">Teal</a>
- <a href="#" class="btn btn-cyan">Cyan</a>
- ```
- ## Ghost buttons
- Use the `.btn-ghost-*` class to make your button look simple yet aesthetically appealing. Ghost buttons help focus users' attention on the website's primary design, at the same time encouraging them to take action.
- ```html example vertical centered separated scrollable height="15rem"
- <a href="#" class="btn btn-ghost-primary">Primary</a>
- <a href="#" class="btn btn-ghost-secondary">Secondary</a>
- <a href="#" class="btn btn-ghost-success">Success</a>
- <a href="#" class="btn btn-ghost-warning">Warning</a>
- <a href="#" class="btn btn-ghost-danger">Danger</a>
- <a href="#" class="btn btn-ghost-info">Info</a>
- <a href="#" class="btn btn-ghost-dark">Dark</a>
- <div class="p-2 bg-dark"><a href="#" class="btn btn-ghost-light">Light</a></div>
- ```
- ```html
- <a href="#" class="btn btn-ghost-primary">Primary</a>
- <a href="#" class="btn btn-ghost-secondary">Secondary</a>
- <a href="#" class="btn btn-ghost-success">Success</a>
- <a href="#" class="btn btn-ghost-warning">Warning</a>
- <a href="#" class="btn btn-ghost-danger">Danger</a>
- <a href="#" class="btn btn-ghost-info">Info</a>
- <a href="#" class="btn btn-ghost-dark">Dark</a>
- <a href="#" class="btn btn-ghost-light">Light</a>
- ```
- ## Square buttons
- Use the `.btn-square` class to remove the border radius, if you want the corners of your button to be square rather than rounded.
- ```html example centered separated height="7rem"
- <a href="#" class="btn btn-square">Square button</a>
- ```
- ```html
- <a href="#" class="btn btn-square">
- Square button
- </a>
- ```
- ## Pill buttons
- Add the `.btn-pill` class to your button to make it rounded and give it a modern and attractive look.
- ```html example centered separated height="7rem"
- <a href="#" class="btn btn-pill">Pill button</a>
- ```
- ```html
- <a href="#" class="btn btn-pill">
- Pill button
- </a>
- ```
- ## Outline buttons
- Replace the default modifier class with the `.btn-outline-*` class, if you want to remove the color and the background of your button and give it a more subtle look. Outline buttons are perfect to use as secondary buttons, as they don't distract users from the main action.
- ```html example vertical centered separated scrollable height="15rem"
- <a href="#" class="btn btn-outline-primary">Primary</a>
- <a href="#" class="btn btn-outline-secondary">Secondary</a>
- <a href="#" class="btn btn-outline-success">Success</a>
- <a href="#" class="btn btn-outline-warning">Warning</a>
- <a href="#" class="btn btn-outline-danger">Danger</a>
- <a href="#" class="btn btn-outline-info">Info</a>
- <a href="#" class="btn btn-outline-dark">Dark</a>
- <a href="#" class="btn btn-outline-light">Light</a>
- ```
- ```html
- <a href="#" class="btn btn-outline-primary">
- Primary
- </a>
- <a href="#" class="btn btn-outline-secondary">
- Secondary
- </a>
- <a href="#" class="btn btn-outline-success">
- Success
- </a>
- <a href="#" class="btn btn-outline-warning">
- Warning
- </a>
- <a href="#" class="btn btn-outline-danger">
- Danger
- </a>
- <a href="#" class="btn btn-outline-info">
- Info
- </a>
- <a href="#" class="btn btn-outline-dark">
- Dark
- </a>
- <a href="#" class="btn btn-outline-light">
- Light
- </a>
- ```
- ## Button size
- Add `.btn-lg` or `.btn-sm` to change the size of your button and differentiate those which should have primary focus from those of secondary importance. Adapt the button size to your design and encourage users to take actions.
- ```html code example centered separated height="8rem"
- <button type="button" class="btn btn-primary btn-lg">Large button</button>
- <button type="button" class="btn btn-lg">Large button</button>
- ```
- ```html code example centered separated height="7rem"
- <button type="button" class="btn btn-primary btn-sm">Small button</button>
- <button type="button" class="btn btn-sm">Small button</button>
- ```
- ## Buttons with icons
- Label your button with text and add an icon to communiacate the action and make it easy to identify for users. Icons are easily recognized and improve the aesthetics of your button design, giving it a modern and atractive look.
- Icons can be found [**here**](/docs/components/icons)
- ```html example centered separated height="7rem"
- <button type="button" class="btn"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" />
- <polyline points="7 9 12 4 17 9" />
- <line x1="12" y1="4" x2="12" y2="16" />
- </svg> Upload</button>
- <button type="button" class="btn btn-warning"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M19.5 12.572l-7.5 7.428l-7.5 -7.428m0 0a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572" />
- </svg> I like</button>
- <button type="button" class="btn btn-success"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M5 12l5 5l10 -10" />
- </svg> I agree</button>
- <button type="button" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <line x1="12" y1="5" x2="12" y2="19" />
- <line x1="5" y1="12" x2="19" y2="12" />
- </svg> More</button>
- <button type="button" class="btn btn-danger"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" />
- <path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" />
- </svg> Link</button>
- <button type="button" class="btn btn-info"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M3 20l1.3 -3.9a9 8 0 1 1 3.4 2.9l-4.7 1" />
- <line x1="12" y1="12" x2="12" y2="12.01" />
- <line x1="8" y1="12" x2="8" y2="12.01" />
- <line x1="16" y1="12" x2="16" y2="12.01" />
- </svg> Comment</button>
- ```
- ```html
- <button type="button" class="btn">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Upload
- </button>
- <button type="button" class="btn btn-warning">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- I like
- </button>
- <button type="button" class="btn btn-success">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- I agree
- </button>
- <button type="button" class="btn btn-primary">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- More
- </button>
- <button type="button" class="btn btn-danger">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Link
- </button>
- <button type="button" class="btn btn-info">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Comment
- </button>
- ```
- ## Social buttons
- You can use the icons of popular social networking sites, which users are familiar with. Thanks to buttons with social media icons users can share content or follow a website with just one click, without leaving the website.
- ```html example vertical centered separated scrollable height="15rem"
- <a href="#" class="btn btn-facebook"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3" />
- </svg> Facebook</a>
- <a href="#" class="btn btn-twitter"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z" />
- </svg> Twitter</a>
- <a href="#" class="btn btn-google"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M17.788 5.108a9 9 0 1 0 3.212 6.892h-8" />
- </svg> Google</a>
- <a href="#" class="btn btn-youtube"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <rect x="3" y="5" width="18" height="14" rx="4" />
- <path d="M10 9l5 3l-5 3z" />
- </svg> Youtube</a>
- <a href="#" class="btn btn-vimeo"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M3 8.5l1 1s1.5 -1.102 2 -.5c.509 .609 1.863 7.65 2.5 9c.556 1.184 1.978 2.89 4 1.5c2 -1.5 7.5 -5.5 8.5 -11.5c.444 -2.661 -1 -4 -2.5 -4c-2 0 -4.047 1.202 -4.5 4c2.05 -1.254 2.551 1.003 1.5 3c-1.052 2.005 -2 3 -2.5 3c-.49 0 -.924 -1.165 -1.5 -3.5c-.59 -2.42 -.5 -6.5 -3 -6.5s-5.5 4.5 -5.5 4.5z" />
- </svg> Vimeo</a>
- <a href="#" class="btn btn-dribbble"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <circle cx="12" cy="12" r="9" />
- <path d="M9 3.6c5 6 7 10.5 7.5 16.2" />
- <path d="M6.4 19c3.5 -3.5 6 -6.5 14.5 -6.4" />
- <path d="M3.1 10.75c5 0 9.814 -.38 15.314 -5" />
- </svg> Dribbble</a>
- <a href="#" class="btn btn-github"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" />
- </svg> Github</a>
- <a href="#" class="btn btn-instagram"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <rect x="4" y="4" width="16" height="16" rx="4" />
- <circle cx="12" cy="12" r="3" />
- <line x1="16.5" y1="7.5" x2="16.5" y2="7.501" />
- </svg> Instagram</a>
- <a href="#" class="btn btn-pinterest"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <line x1="8" y1="20" x2="12" y2="11" />
- <path d="M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7" />
- <circle cx="12" cy="12" r="9" />
- </svg> Pinterest</a>
- <a href="#" class="btn btn-vk"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M14 19h-4a8 8 0 0 1 -8 -8v-5h4v5a4 4 0 0 0 4 4h0v-9h4v4.5l.03 -.004a4.531 4.531 0 0 0 3.97 -4.496h4l-.342 1.711a6.858 6.858 0 0 1 -3.658 4.789h0a5.34 5.34 0 0 1 3.566 4.111l.434 2.389h0h-4a4.531 4.531 0 0 0 -3.97 -4.496v4.5z" />
- </svg> VK</a>
- <a href="#" class="btn btn-rss"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <circle cx="5" cy="19" r="1" />
- <path d="M4 4a16 16 0 0 1 16 16" />
- <path d="M4 11a9 9 0 0 1 9 9" />
- </svg> RSS</a>
- <a href="#" class="btn btn-flickr"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <circle cx="7" cy="12" r="3" />
- <circle cx="17" cy="12" r="3" />
- </svg> Flickr</a>
- <a href="#" class="btn btn-bitbucket"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M3.648 4a0.64 .64 0 0 0 -.64 .744l3.14 14.528c.07 .417 .43 .724 .852 .728h10a0.644 .644 0 0 0 .642 -.539l3.35 -14.71a0.641 .641 0 0 0 -.64 -.744l-16.704 -.007z" />
- <path d="M14 15h-4l-1 -6h6z" />
- </svg> Bitbucket</a>
- <a href="#" class="btn btn-tabler"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M8 9l3 3l-3 3" />
- <line x1="13" y1="15" x2="16" y2="15" />
- <rect x="4" y="4" width="16" height="16" rx="4" />
- </svg> Tabler</a>
- ```
- ```html
- <a href="#" class="btn btn-facebook">
- <!-- SVG icon from http://tabler-icons.io/i/brand-facebook -->
- <svg>...</svg>
- Facebook
- </a>
- <a href="#" class="btn btn-twitter">
- <!-- SVG icon from http://tabler-icons.io/i/brand-twitter -->
- <svg>...</svg>
- Twitter
- </a>
- <a href="#" class="btn btn-google">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Google
- </a>
- <a href="#" class="btn btn-youtube">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Youtube
- </a>
- <a href="#" class="btn btn-vimeo">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Vimeo
- </a>
- <a href="#" class="btn btn-dribbble">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Dribbble
- </a>
- <a href="#" class="btn btn-github">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Github
- </a>
- <a href="#" class="btn btn-instagram">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Instagram
- </a>
- <a href="#" class="btn btn-pinterest">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Pinterest
- </a>
- <a href="#" class="btn btn-vk">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- VK
- </a>
- <a href="#" class="btn btn-rss">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- RSS
- </a>
- <a href="#" class="btn btn-flickr">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Flickr
- </a>
- <a href="#" class="btn btn-bitbucket">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Bitbucket
- </a>
- <a href="#" class="btn btn-tabler">
- <!-- SVG icon from http://tabler-icons.io -->
- <svg>...</svg>
- Tabler
- </a>
- ```
- You can also add an icon without the name of a social networking site, if you want to display more buttons on a small space.
- ```html example separated scrollable height="7rem"
- <a href="#" class="btn btn-facebook btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3" />
- </svg>
- </a>
- <a href="#" class="btn btn-twitter btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z" />
- </svg>
- </a>
- <a href="#" class="btn btn-google btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M17.788 5.108a9 9 0 1 0 3.212 6.892h-8" />
- </svg>
- </a>
- <a href="#" class="btn btn-youtube btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <rect x="3" y="5" width="18" height="14" rx="4" />
- <path d="M10 9l5 3l-5 3z" />
- </svg>
- </a>
- <a href="#" class="btn btn-vimeo btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M3 8.5l1 1s1.5 -1.102 2 -.5c.509 .609 1.863 7.65 2.5 9c.556 1.184 1.978 2.89 4 1.5c2 -1.5 7.5 -5.5 8.5 -11.5c.444 -2.661 -1 -4 -2.5 -4c-2 0 -4.047 1.202 -4.5 4c2.05 -1.254 2.551 1.003 1.5 3c-1.052 2.005 -2 3 -2.5 3c-.49 0 -.924 -1.165 -1.5 -3.5c-.59 -2.42 -.5 -6.5 -3 -6.5s-5.5 4.5 -5.5 4.5z" />
- </svg>
- </a>
- <a href="#" class="btn btn-dribbble btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <circle cx="12" cy="12" r="9" />
- <path d="M9 3.6c5 6 7 10.5 7.5 16.2" />
- <path d="M6.4 19c3.5 -3.5 6 -6.5 14.5 -6.4" />
- <path d="M3.1 10.75c5 0 9.814 -.38 15.314 -5" />
- </svg>
- </a>
- <a href="#" class="btn btn-github btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" />
- </svg>
- </a>
- <a href="#" class="btn btn-instagram btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <rect x="4" y="4" width="16" height="16" rx="4" />
- <circle cx="12" cy="12" r="3" />
- <line x1="16.5" y1="7.5" x2="16.5" y2="7.501" />
- </svg>
- </a>
- <a href="#" class="btn btn-pinterest btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <line x1="8" y1="20" x2="12" y2="11" />
- <path d="M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7" />
- <circle cx="12" cy="12" r="9" />
- </svg>
- </a>
- <a href="#" class="btn btn-vk btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M14 19h-4a8 8 0 0 1 -8 -8v-5h4v5a4 4 0 0 0 4 4h0v-9h4v4.5l.03 -.004a4.531 4.531 0 0 0 3.97 -4.496h4l-.342 1.711a6.858 6.858 0 0 1 -3.658 4.789h0a5.34 5.34 0 0 1 3.566 4.111l.434 2.389h0h-4a4.531 4.531 0 0 0 -3.97 -4.496v4.5z" />
- </svg>
- </a>
- <a href="#" class="btn btn-rss btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <circle cx="5" cy="19" r="1" />
- <path d="M4 4a16 16 0 0 1 16 16" />
- <path d="M4 11a9 9 0 0 1 9 9" />
- </svg>
- </a>
- <a href="#" class="btn btn-flickr btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <circle cx="7" cy="12" r="3" />
- <circle cx="17" cy="12" r="3" />
- </svg>
- </a>
- <a href="#" class="btn btn-bitbucket btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M3.648 4a0.64 .64 0 0 0 -.64 .744l3.14 14.528c.07 .417 .43 .724 .852 .728h10a0.644 .644 0 0 0 .642 -.539l3.35 -14.71a0.641 .641 0 0 0 -.64 -.744l-16.704 -.007z" />
- <path d="M14 15h-4l-1 -6h6z" />
- </svg>
- </a>
- <a href="#" class="btn btn-tabler btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M8 9l3 3l-3 3" />
- <line x1="13" y1="15" x2="16" y2="15" />
- <rect x="4" y="4" width="16" height="16" rx="4" />
- </svg>
- </a>
- ```
- ```html
- <a href="#" class="btn btn-facebook btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-facebook -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-twitter btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-twitter -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-google btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-google -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-youtube btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-youtube -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-vimeo btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-vimeo -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-dribbble btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-dribbble -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-github btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-github -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-instagram btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-instagram -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-pinterest btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-pinterest -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-vk btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-vk -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-rss btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/rss -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-flickr btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-flickr -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-bitbucket btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-bitbucket -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-tabler btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-tabler -->
- <svg>...</svg>
- </a>
- ```
- ## Icon buttons
- Add the `.btn-icon` class to remove unnecessary padding from your button and use an icon without any additional label. Thanks to that, you can save space and make the action easy to recognize for international users.
- ```html example centered separated height="7rem"
- <a href="#" class="btn btn-primary btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M3 12h4l3 8l4 -16l3 8h4" />
- </svg>
- </a>
- <a href="#" class="btn btn-github btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" />
- </svg>
- </a>
- <a href="#" class="btn btn-success btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M10 5a2 2 0 0 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" />
- <path d="M9 17v1a3 3 0 0 0 6 0v-1" />
- </svg>
- </a>
- <a href="#" class="btn btn-warning btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z" />
- </svg>
- </a>
- <a href="#" class="btn btn-danger btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <line x1="4" y1="7" x2="20" y2="7" />
- <line x1="10" y1="11" x2="10" y2="17" />
- <line x1="14" y1="11" x2="14" y2="17" />
- <path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" />
- <path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" />
- </svg>
- </a>
- <a href="#" class="btn btn-purple btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <rect x="3" y="12" width="6" height="8" rx="1" />
- <rect x="9" y="8" width="6" height="12" rx="1" />
- <rect x="15" y="4" width="6" height="16" rx="1" />
- <line x1="4" y1="20" x2="18" y2="20" />
- </svg>
- </a>
- <a href="#" class="btn btn-icon" aria-label="Button">
- <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <circle cx="7" cy="18" r="2" />
- <circle cx="7" cy="6" r="2" />
- <circle cx="17" cy="12" r="2" />
- <line x1="7" y1="8" x2="7" y2="16" />
- <path d="M7 8a4 4 0 0 0 4 4h4" />
- </svg>
- </a>
- ```
- ```html
- <a href="#" class="btn btn-primary btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/activity -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-github btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/brand-github -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-success btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/bell -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-warning btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/star -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-danger btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/trash -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-purple btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/chart-bar -->
- <svg>...</svg>
- </a>
- <a href="#" class="btn btn-icon" aria-label="Button">
- <!-- SVG icon from http://tabler-icons.io/i/git-merge -->
- <svg>...</svg>
- </a>
- ```
- ## Dropdown buttons
- Create a dropdown button that will encourage users to click for more options. You can add a label with an icon or remove the label and add an icon on its own if you want to save space. Choose the option that will best suit your design and improve the user experience.
- ```html example centered separated height="7rem"
- <div class="dropdown">
- <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <rect x="4" y="5" width="16" height="16" rx="2" />
- <line x1="16" y1="3" x2="16" y2="7" />
- <line x1="8" y1="3" x2="8" y2="7" />
- <line x1="4" y1="11" x2="20" y2="11" />
- <line x1="11" y1="15" x2="12" y2="15" />
- <line x1="12" y1="15" x2="12" y2="18" />
- </svg></button>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="#">Action</a>
- <a class="dropdown-item" href="#">Another action</a>
- </div>
- </div>
- <div class="dropdown">
- <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
- <rect x="4" y="5" width="16" height="16" rx="2" />
- <line x1="16" y1="3" x2="16" y2="7" />
- <line x1="8" y1="3" x2="8" y2="7" />
- <line x1="4" y1="11" x2="20" y2="11" />
- <line x1="11" y1="15" x2="12" y2="15" />
- <line x1="12" y1="15" x2="12" y2="18" />
- </svg> Show calendar</button>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="#">Action</a>
- <a class="dropdown-item" href="#">Another action</a>
- </div>
- </div>
- <div class="dropdown">
- <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">Show calendar</button>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="#">Action</a>
- <a class="dropdown-item" href="#">Another action</a>
- </div>
- </div>
- ```
- ```html
- <div class="dropdown">
- <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
- <!-- SVG icon from http://tabler-icons.io/i/calendar -->
- <svg>...</svg>
- </button>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="#">
- Action
- </a>
- <a class="dropdown-item" href="#">
- Another action
- </a>
- </div>
- </div>
- <div class="dropdown">
- <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
- <!-- SVG icon from http://tabler-icons.io/i/calendar -->
- <svg>...</svg>
- Show calendar
- </button>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="#">
- Action
- </a>
- <a class="dropdown-item" href="#">
- Another action
- </a>
- </div>
- </div>
- <div class="dropdown">
- <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
- Show calendar
- </button>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="#">
- Action
- </a>
- <a class="dropdown-item" href="#">
- Another action
- </a>
- </div>
- </div>
- ```
- ## Loading buttons
- Add the `.btn-loading` class to show a button's loading state, which can be useful in the case of operations that take longer to process. Thanks to that, users will be aware of the current state of their action and won't give it up before it's finished.
- ```html example centered separated height="7rem"
- <a href="#" class="btn btn-primary btn-loading">Button</a>
- <a href="#" class="btn btn-primary btn-loading">Loading button with loooong content</a>
- ```
- ```html
- <a href="#" class="btn btn-primary btn-loading">
- Button
- </a>
- <a href="#" class="btn btn-primary btn-loading">
- Loading button with loooong content
- </a>
- ```
- ```html example centered height="7rem"
- <a href="#" class="btn btn-primary"><span class="spinner-border spinner-border-sm me-2" role="status"></span> Button</a>
- ```
- ```html
- <a href="#" class="btn btn-primary">
- <span class="spinner-border spinner-border-sm me-2" role="status"></span>
- Button
- </a>
- ```
- ## List of buttons
- Create a list of buttons using the `.btn-list` container to display different actions a user can take. If you add aditional styling, such as colours, you will be able to focus users' attention on a particular action or suggest the result.
- ```html code example vertical centered columns={3} height="7rem"
- <div class="btn-list">
- <a href="#" class="btn btn-success">Save changes</a>
- <a href="#" class="btn">Save and continue</a>
- <a href="#" class="btn btn-danger">Cancel</a>
- </div>
- ```
- If the list is long, it will be wrapped and some buttons will be moved to the next line, keeping them all evenly spaced.
- ```html code example centered
- <div class="btn-list">
- <a href="#" class="btn">One</a>
- <a href="#" class="btn">Two</a>
- <a href="#" class="btn">Three</a>
- <a href="#" class="btn">Four</a>
- <a href="#" class="btn">Five</a>
- <a href="#" class="btn">Six</a>
- <a href="#" class="btn">Seven</a>
- <a href="#" class="btn">Eight</a>
- <a href="#" class="btn">Nine</a>
- <a href="#" class="btn">Ten</a>
- <a href="#" class="btn">Eleven</a>
- <a href="#" class="btn">Twelve</a>
- <a href="#" class="btn">Thirteen</a>
- <a href="#" class="btn">Fourteen</a>
- <a href="#" class="btn">Fifteen</a>
- <a href="#" class="btn">Sixteen</a>
- <a href="#" class="btn">Seventeen</a>
- <a href="#" class="btn">Eighteen</a>
- <a href="#" class="btn">Nineteen</a>
- </div>
- ```
- Use the `.text-center` or the `.text-end` modifiers to change the buttons' alignment and place them where they suit best.
- ```html code example vertical centered columns={3} height="7rem"
- <div class="btn-list justify-content-center">
- <a href="#" class="btn">Save and continue</a>
- <a href="#" class="btn btn-primary">Save changes</a>
- </div>
- ```
- ```html code example vertical centered columns={3} height="7rem"
- <div class="btn-list justify-content-end">
- <a href="#" class="btn">Save and continue</a>
- <a href="#" class="btn btn-primary">Save changes</a>
- </div>
- ```
- ```html code example vertical centered columns={3} height="7rem"
- <div class="btn-list">
- <a href="#" class="btn btn-outline-danger me-auto">Delete</a>
- <a href="#" class="btn">Save and continue</a>
- <a href="#" class="btn btn-primary">Save changes</a>
- </div>
- ```
- ## Buttons with avatars
- Use buttons with avatars to simplify the process of interaction and make your design more personalized. Buttons can contain avatars and labels or only avatars, if displayed on a smaller space.
- ```html example centered separated height="7rem"
- <a href="#" class="btn"><span class="avatar" style={{ backgroundImage: 'url(https://images.unsplash.com/photo-1542534759-05f6c34a9e63?q=80&fm=jpg&crop=faces&fit=crop&h=100&w=100)'}}></span> Avatar</a>
- <a href="#" class="btn"><span class="avatar" style={{ backgroundImage: 'url(https://images.unsplash.com/photo-1546539782-6fc531453083?q=80&fm=jpg&crop=faces&fit=crop&h=100&w=100)'}}></span> Avatar</a>
- <a href="#" class="btn"><span class="avatar" style={{ backgroundImage: 'url(https://images.unsplash.com/photo-1541585452861-0375331f10bf?q=80&fm=jpg&crop=faces&fit=crop&h=100&w=100)'}}></span> Avatar</a>
- ```
- ```html
- <a href="#" class="btn">
- <span class="avatar" style="background-image: url(...)"></span> Avatar
- </a>
- <a href="#" class="btn">
- <span class="avatar" style="background-image: url(...)"></span> Avatar
- </a>
- <a href="#" class="btn">
- <span class="avatar" style="background-image: url(...)"></span> Avatar
- </a>
- ```
|