A dark Bootstrap 6 hero for developer tools and tech products. A blurred gradient mesh and a faint grid sit behind a large headline with gradient text, a glowing call to action, a copyable install command and a decorative orbit with three floating stat cards. A row of trust logos closes the section.
How it works
The root .dgh-hero carries data-bs-theme="dark", so every Bootstrap component inside it uses dark tokens whatever the visitor's OS setting. Two absolutely positioned layers make the background. .dgh-mesh stacks four radial-gradients and blurs them, and .dgh-grid-lines draws a 56 px grid faded out with mask-image.
The layout is a Bootstrap 6 row with lg:col-7 text and a lg:col-5 visual. The visual is hidden below 1024 px with d-none lg:d-block, so phones get only the text. The headline's second line is .dgh-gradient, a cyan-violet-pink gradient clipped to the text. The main button is btn-solid btn-styled theme-primary, which adds Bootstrap 6's built-in gradient and shadow, plus a cyan glow. The orb is CSS only: three .dgh-ring circles (the outer one slowly rotates), a glowing .dgh-core, colored .dgh-node dots and three .dgh-float stat cards.
.dgh-cmd shows a shell command with a btn-icon copy button. Its "Copy to clipboard" tooltip comes from data-bs-toggle="tooltip"; in Bootstrap 6 tooltips set themselves up on first hover or focus, so there is no init loop. script.js copies with navigator.clipboard.writeText() and falls back to execCommand('copy'). It swaps the icon to a check and announces the result in .dgh-copy-status. The trust logos are fictional inline SVG marks with text names.
Customization
--dgh-cyan,--dgh-violetand--dgh-pinkon.dgh-hero: change the gradient text, glows and orb colors. The--bs-primary-*overrides keep the Bootstrap button in the same cyan.--dgh-bg,--dgh-textand--dgh-muted: set the page background and the two text tones.- Edit the
radial-gradientpositions in.dgh-meshto move the color blobs. - Change the
.dgh-cmd-textcontent to your own CLI or package command. The copy button always copies whatever text is inside it. - Replace each
liin.dgh-logoswith your customers' SVG logos. Set the column count ingrid-template-columns(six from 768 px). - Edit the
.dgh-floattext, or move the cards with thetop/left/rightvalues in.dgh-float-1to.dgh-float-3.
Use cases
- Developer tools: a copyable install command sits right under the headline
- Tech products: a gradient mesh background and glowing call to action set a modern mood
- Open source projects: a decorative orbit shows three floating stat cards
- Product launches: a row of trust logos closes the hero section
Accessibility
The section is labelled by its h1. The decorative orb, grid and mesh are aria-hidden. The copy button has an aria-label, a tooltip and a role="status" message, so screen reader users hear whether copying worked. Text colors are light enough on the near-black background to meet WCAG AA. Links and buttons keep a visible cyan focus ring. The rotating ring stops under prefers-reduced-motion.
Bootstrap 6 notes
Dark mode is the data-bs-theme="dark" attribute; Bootstrap 6 has no bg-dark or navbar-dark style switches. Buttons use btn-solid btn-styled theme-primary and btn-outline theme-secondary, and the badge is badge theme-primary. Responsive classes use the prefix syntax lg:col-7 and lg:d-block instead of col-lg-7 and d-lg-block. Built on 6.0.0-alpha.1, so APIs may still change. Icons come from Bootstrap Icons.