Skip to content

Feature Cards with Hover Glow

Dark pure CSS feature grid whose card borders and backgrounds light up with a colored glow that follows the mouse pointer.

Also known as: hover glow effect, spotlight cards, feature grid, glowing card hover effect

Feature Cards with Hover Glow live demo

Open in new tab

Pure CSS code (HTML, CSS, JS)

A dark feature section with six cards whose borders and backgrounds light up with a colored glow that follows the mouse. Built with pure CSS and a small vanilla JavaScript helper, it suits SaaS landing pages, product overviews and developer tool sites that want a modern, interactive feature grid.

How it works

The root section.fhg-section holds a centered .fhg-header and the .fhg-grid. Each article.fhg-card is a 1px frame around an inner .fhg-body, so the card background shows only as a thin border. Two pseudo-elements draw the glow, both as a radial-gradient positioned at the custom properties --fhg-x and --fhg-y: .fhg-card::before is the border glow in the full accent color, and .fhg-body::before is a soft inner glow mixed with color-mix() at 20 percent.

The script listens for pointermove on the grid and, once per animation frame, writes the pointer position relative to every card into --fhg-x and --fhg-y. While the pointer is anywhere over the grid, all borders glow, so neighboring cards catch the light near their edges, but only the hovered card shows the inner glow. On pointerleave the inline values are removed and the default state returns. On first load the second card carries .is-lit, so the section never looks flat, and focusin centers the glow on a card reached with the keyboard. Without JavaScript the hover glow still appears at the default position from CSS.

Customization

  • .fhg-card--violet, --cyan, --lime, --amber, --pink and --blue: each sets --fhg-accent for the glow, icon and link color of one card. Add your own modifier for another color.
  • --fhg-glow-size and --fhg-border-glow-size on .fhg-section: radius of the inner and border glow; larger values give a softer, wider light.
  • --fhg-bg, --fhg-card-bg and --fhg-border: section background, card background and the resting border color.
  • Move .is-lit to another card, or remove it, to change which card glows on page load.
  • --fhg-radius: corner radius of the cards and the focus outline.
  • grid-template-columns in the .fhg-grid media queries: one column on phones, two from 640px and three from 960px.

Use cases

  • SaaS landing pages: list product features in an interactive grid
  • Developer tool sites: a dark, modern features section
  • Product overviews: six key benefits with icons and short text

Accessibility

The section is labelled by its heading, and every card is an article with an h3. The "Learn more" link stretches over the whole card through .fhg-link::after, and it includes visually hidden text such as "about analytics" so each link has a unique name. Keyboard users get the same glow through :focus-within plus a clear outline on the card. Icons are aria-hidden. Text colors on the dark background meet WCAG AA contrast. With prefers-reduced-motion: reduce the fade transitions and the arrow movement are turned off.

Usage notes

color-mix() needs a current browser. Several sections can share a page; each one tracks its own pointer.

Feature Cards with Hover Glow at a glance

Framework
Pure CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
None
Layout
Responsive, works on mobile, dark design
Category
Feature Sections
License
Free for personal and commercial use

Questions about this template

Can I use the Feature Cards with Hover Glow 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?

There is nothing to install. Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

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

No dependencies. Pure HTML, CSS and JavaScript.

Feature Cards with Hover Glow – free Pure CSS feature section template
Feature Cards with Hover Glow · free Pure CSS feature section template

More Feature Sections

Feature Grid with Icons – free Tailwind CSS feature section template

Feature Grid with Icons

Responsive Tailwind CSS feature section with six features, inline SVG icons, hairline dividers and a subtle hover accent.

Alternating Feature Rows – free Bootstrap 5 feature section template

Alternating Feature Rows

Bootstrap 5 feature section with image and text rows that alternate sides on desktop, with icons, checklists, highlight chips and offset image shapes.

Bento Grid Feature Section – free Tailwind CSS feature section template

Bento Grid Feature Section

Asymmetric Tailwind CSS bento grid feature section with large, wide, tall and small tiles, inline SVG chart and mini illustrations.

How It Works Section with Three Steps – free WordPress feature section template

How It Works Section with Three Steps

Gutenberg how it works section with three numbered steps, a connecting divider line, short step descriptions and a centered call to action button.

Alternating Image and Text Feature Rows – free WordPress feature section template

Alternating Image and Text Feature Rows

Gutenberg feature section with three alternating image and text rows, each with eyebrow, heading, checklist and button, styled for a design studio.