Skip to content

Vivid colour feature section

Three cards in saturated flat colours (yellow, pink, electric blue) with high-contrast text and a dark variant. Every colour pair is measured at AA: 5.5:1 at worst.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

A feature section in the "dopamine" style without giving up readability. A header with a title, an intro and a button to the prices, then three cards in saturated flat colours, each with an icon badge, a tag-style eyebrow, a title, a text and an underlined link with a distinct name. Each card gets an ink chosen for its colour (black on yellow and pink, white on electric blue): eyebrow, icon and focus ring derive from it, with no transparency that would skew contrast. Contrast is measured at generation time, in light and dark themes: 5.5:1 for the weakest pair, above the 4.5:1 AA threshold; the file refuses to generate if a pair falls below it. Dark variant: near-black background, light borders, slightly lighter fills and a pink drop shadow; it follows the page data-theme attribute then the system preference, and data-fdv-scheme="dark" or "light" forces it for this block only (scheme prop in React). Theming: a single list of CSS variables (--fdv-yellow, --fdv-pink, --fdv-blue and their inks, background, border, shadow) with a light and a dark value. Performance cost: CSS only, no script or image, no layout shift, hover and focus lift the card with transform only, motion removed under prefers-reduced-motion. Accessibility: ordered headings, a list of cards, decorative icons hidden, links of at least 44 px, thick visible focus, border kept in high contrast mode. Long text: titles and links wrap without overflowing from 320 px. French typography (non-breaking spaces, « » quotes). Example: a bouldering gym.

Code

Loading the code…

The code of this component in

Archive contents

features-fond-couleurs-vives-dopamine-html-tailwind.zip3 files · 6 Ko

  • index.html10 Ko
  • README.md5 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • A six-cell bento grid: key figures, SVG sparklines, a quote and icons. All the text is in the HTML and the animation is CSS only, with no script at all.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Six features as frosted glass cards over a slowly drifting aurora mesh gradient. Pause button, still background under prefers-reduced-motion, CSS and a light script.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • The key message stays pinned while the background changes colour and illustration at each scroll step. CSS sticky, a light script, stacked cards as fallback under prefers-reduced-motion.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A two-offer table: checked rows, a column highlighted from top to bottom and one call-to-action button per offer. Pure HTML and CSS, no script at all.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component