Skip to content

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.

Also known as: bootstrap 5 button group row, primary and secondary buttons html, call to action buttons centered, button row with link bootstrap

Centered Button Row with Secondary Link live demo

Open in WDS Editor Open in new tab

Bootstrap 5 code (HTML)

A compact, centered row of actions for the moment a reader is ready to act: a solid primary button, an outlined secondary button and a plain text link, followed by a small reassurance line. It is designed to sit at the end of blog posts, product pages, documentation tutorials and CMS landing pages, or between sections of a long article when you want to offer a clear next step without a full banner.

How it works

The wrapper div uses text-center py-3 and the bottom margin mb-4. All three actions sit in one paragraph that is a flex container: d-flex flex-wrap justify-content-center align-items-center gap-2. flex-wrap lets the buttons wrap onto a second line on narrow screens, and gap-2 keeps even spacing in both directions. The actions are links styled with Bootstrap button classes: btn btn-primary btn-lg px-4, btn btn-outline-secondary btn-lg px-4 and btn btn-link btn-lg text-decoration-none, so they share the same height and baseline. The note below uses small text-body-secondary and middle dots as separators.

Customization

  • Remove btn-lg from all three links for a smaller row that fits inside paragraphs of text.
  • Swap btn-primary for btn-success or btn-dark to match your brand.
  • Change justify-content-center to justify-content-start and drop text-center for a left-aligned row.
  • Replace btn-outline-secondary with btn-light border for a softer secondary button.
  • Delete the text link or the note if you need only one or two actions.
  • Add rounded-pill to the buttons for a friendlier, pill-shaped style.

Accessibility

All actions are real links with descriptive text, so their purpose is clear out of context ("Start free trial", "Book a demo", "Compare plans"). The arrow is a text character next to words. Bootstrap's button styles include visible focus rings, and the primary and outline variants meet WCAG AA contrast. Because they are links, use them for navigation; real form submissions belong in a form on the target page.

Usage notes

The block contains no custom CSS or JavaScript, so it can be pasted anywhere Bootstrap 5 is loaded. It is part of the WDS Editor snippet library (snippets: { framework: 'bootstrap5' }); the button labels, link targets and the note can all be edited in place.

Centered Button Row with Secondary Link at a glance

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

Questions about this template

Can I use the Centered Button Row with Secondary Link 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 5 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 5'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@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
Centered Button Row with Secondary Link – free Bootstrap 5 editor block template
Centered Button Row with Secondary Link · free Bootstrap 5 editor block template

More Editor Blocks

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

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.