Skip to content

Primary, Secondary and Link Button Row

Bootstrap 6 button row with a solid primary action, an outline secondary action, a text link and a reassurance line, for calls to action inside articles.

Also known as: bootstrap 6 button group, primary and secondary buttons html, call to action buttons in article, bootstrap 6 btn-solid example

Primary, Secondary and Link Button Row live demo

Open in WDS Editor Open in new tab

Bootstrap 6 code (HTML)

A row of three actions with a clear hierarchy: a solid primary button, an outline secondary button and a quiet text link, followed by a one-line reassurance. Drop it at the end of a blog post, product announcement, documentation page or landing section whenever readers should take the next step.

How it works

The block is a div with .border-top.border-bottom.py-7, which frames the actions with hairlines above and below. The three links sit in one paragraph with .d-flex.flex-wrap.align-items-center.gap-3, so they wrap neatly on narrow screens.

  • Bootstrap 6 splits buttons into style classes plus a theme: .btn-solid.theme-primary is the filled main action, .btn-outline.theme-secondary the bordered alternative and .btn-text.theme-primary a button-sized text link.
  • .btn-lg makes all three the same height so they align on one baseline.
  • The reassurance line uses .fs-sm.fg-3 for small gray text.

Customization

  • Remove .btn-lg for regular-size buttons, or use .btn-sm in tight sidebars.
  • Change the theme, for example .theme-success on the primary button for sign-up flows.
  • Use .btn-subtle.theme-primary instead of the outline button for a softer secondary action.
  • Center everything with .justify-content-center on the button paragraph and .text-center on the note.
  • Drop the borders by removing .border-top.border-bottom when the block sits inside a card.

Accessibility

All three actions are real links with descriptive text ("Book a demo", "Compare plans"), so they make sense out of context. Keep only one solid button per block so the main action is obvious. The arrow in the text link is decorative. The small gray note uses .fg-3, which keeps WCAG AA contrast on white.

Usage notes

The block contains no custom CSS and no JavaScript, only Bootstrap 6 (6.0.0-alpha.1) classes, so it can be pasted into any page, CMS field or newsletter template where the Bootstrap 6 stylesheet is loaded. It is also part of the WDS Editor snippet library: enable it with snippets: { framework: 'bootstrap6' } and insert it from the block picker, then edit every text in place.

Primary, Secondary and Link Button Row at a glance

Framework
Bootstrap 6
Code
HTML
JavaScript
Only Bootstrap 6's own script
Dependencies
Bootstrap 6
Layout
Responsive, works on mobile
Category
Editor Blocks
License
Free for personal and commercial use

Questions about this template

Can I use the Primary, Secondary and Link Button Row code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 6 from a CDN (the links are under Requirements). Paste the HTML where the component should appear. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. Only Bootstrap 6's own JavaScript is used, and the download already includes it.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/css/bootstrap.min.css">
  • <script type="module" src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/js/bootstrap.bundle.min.js"></script>

Built for Bootstrap 6.0.0-alpha.1. Bootstrap 6 ships as an ES module, so its script and this component's JavaScript load with type="module". Alpha releases can still change before the stable version.

Primary, Secondary and Link Button Row – free Bootstrap 6 editor block template
Primary, Secondary and Link Button Row · free Bootstrap 6 editor block template

More Editor Blocks

Centered Button Row with Secondary Link – free Bootstrap 5 editor block template

Centered Button Row with Secondary Link

Bootstrap 5 centered button row with a primary button, an outline button, a plain text link and a small note, for the end of articles, docs and CMS pages.