A set of Bootstrap 5 social follow buttons for X, Instagram, YouTube, LinkedIn, GitHub and Facebook. Each button shows the network icon in its brand color, the account handle and a compact follower count, and a header adds up all followers. Use it in a footer, a blog sidebar or a creator profile.
How it works
The block is a section.sfc-card inside a softly tinted .sfc-wrap. The buttons sit in a Bootstrap ul.row with row-cols-1 row-cols-sm-2 row-cols-lg-3, so they stack on phones, form two columns on tablets and three on desktops. Each button.sfc-btn has three parts: the square .sfc-btn__icon with a Bootstrap Icons brand glyph, the .sfc-btn__body with the "Follow" label and the handle, and the .sfc-btn__count pill.
Brand colors come from a modifier class such as sfc-btn--youtube, which sets the --sfc-brand custom property. The icon tile, the hover border, the glow and the active state all read that one variable. Instagram also sets --sfc-brand-bg to its gradient.
The script runs on DOMContentLoaded for every .sfc-card. It reads the raw number from data-sfc-count and formats it with Intl.NumberFormat in compact notation, so 126500 becomes "126.5K". It then sums all buttons into .sfc-total__num. A click toggles the is-following class, switches the label between "Follow" and "Following", adds or removes one follower, plays a short bump animation on the count and refreshes the total.
Customization
data-sfc-counton each.sfc-btn: the exact follower number; the script formats it and updates the total.--sfc-brandin a modifier such as.sfc-btn--linkedin: change a brand color, or add a new class like.sfc-btn--threadswith its own color and abi-threadsicon.--sfc-radiusin.sfc-wrap: make the buttons square-cornered or fully rounded.row-cols-lg-3on the list: userow-cols-lg-2for wider buttons orrow-cols-lg-6with shorter content for a single row.- Remove
is-followingfrom the YouTube button and set its label back to "Follow" to start with nothing followed. - The
maximumFractionDigitsoption of theIntl.NumberFormatcall inscript.js: set it to0to show "127K" instead of "126.5K". - The click handler in
script.js: replace the comment with a call to your API, or open the profile URL in a new tab.
Use cases
- Website footers: brand-colored buttons for X, Instagram, YouTube, LinkedIn, GitHub and Facebook link to every profile
- Blog sidebars: compact follower counts and a live total encourage readers to follow your channels
- Creator profile pages: each button shows the handle and a count, and toggles to a Following state
- Developer portfolios: GitHub and LinkedIn sit next to other networks in one tidy, responsive grid
Accessibility
Every control is a native button, so it works with Tab, Enter and Space. Brand icons are aria-hidden, and visually-hidden text gives each button a full name such as "Follow @brightlane on X 48.2K followers". When the state changes, the .sfc-live region announces "You now follow us on GitHub." The check mark before "Following" uses CSS alt text so it is not read aloud. Focus is shown with a 3 px outline in the brand color, and hover lift and bump animation are disabled under prefers-reduced-motion: reduce.
Usage notes
Requires Bootstrap 5 and Bootstrap Icons. If you only need links to your profiles, change each button to an a with href, target="_blank" and rel="noopener", and remove the click handler.