Skip to content

feat(section): add feature grid hover reveal component#455

Open
KeenIsHere wants to merge 5 commits intocodse:mainfrom
KeenIsHere:feat/feature-grid-hover-reveal
Open

feat(section): add feature grid hover reveal component#455
KeenIsHere wants to merge 5 commits intocodse:mainfrom
KeenIsHere:feat/feature-grid-hover-reveal

Conversation

@KeenIsHere
Copy link
Copy Markdown

@KeenIsHere KeenIsHere commented Apr 29, 2026

Summary

Adds a polished Feature Grid Hover Reveal section component with icon cards, hover animations, and full accessibility support.

What's included

  • animata/section/feature-grid-hover-reveal.tsx — component
  • animata/section/feature-grid-hover-reveal.stories.tsx — Storybook stories
  • content/docs/section/feature-grid-hover-reveal.mdx — documentation

Features

  • CSS Grid: 1 col mobile, 2 col tablet, 3 col desktop
  • Hover lift: -translate-y-1.5 with 300ms transition
  • Icon scale: scale-115 with 200ms transition
  • Border highlight: border-primary/40 on hover
  • Subtle ring overlay: fades in via opacity on hover
  • prefers-reduced-motion: checked via useEffect + useState, all animations disabled when set
  • Hover state also triggered on focus/blur for keyboard users
  • aria-hidden on decorative ring element
  • 44x44px icon container meets minimum touch target
  • Dark mode support with Tailwind tokens only
  • Configurable 2 or 3 column layout via prop
  • Optional section title and subtitle
  • Zero-props render with 6 default SaaS feature items

Props

Prop Type Default Description
features FeatureItem[] 6 built-in items Array of feature cards
columns 2 or 3 3 Grid column count
title string Built-in heading Section title
subtitle string Built-in subtitle Section subtitle

Stories

  • Primary — default props, no args
  • TwoColumn — columns=2 with 4 features
  • CustomContent — custom feature items

Testing done

  • 6 cards render with default data
  • Hover lift works on all cards
  • Icon scales up on hover
  • Ring overlay fades in on hover
  • Border highlights on hover
  • Dark mode looks clean
  • Mobile single column layout
  • Tablet 2-column layout
  • Desktop 3-column layout
  • Keyboard focus triggers hover state
  • No console errors
  • Biome lint passes

Credits

Built by Keen Sha

Summary by CodeRabbit

  • New Features

    • Added Feature Grid Hover Reveal section for landing pages with configurable columns, title, subtitle, interactive hover/focus effects, responsive layout, dark mode support, keyboard accessibility, and reduced-motion compliance
    • Added Storybook previews demonstrating primary, two-column, and custom-content variants
  • Documentation

    • Added comprehensive docs with usage examples, props reference, behavior notes, and accessibility guidance

Copilot AI review requested due to automatic review settings April 29, 2026 04:49
@KeenIsHere KeenIsHere temporarily deployed to preview-deployment April 29, 2026 04:49 — with GitHub Actions Inactive
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2cc34be3-1929-4901-a9a8-15e6e97b4292

📥 Commits

Reviewing files that changed from the base of the PR and between ef6d39e and 30a3b5e.

📒 Files selected for processing (1)
  • content/docs/section/feature-grid-hover-reveal.mdx
✅ Files skipped from review due to trivial changes (1)
  • content/docs/section/feature-grid-hover-reveal.mdx

📝 Walkthrough

Walkthrough

Adds a new client component FeatureGridHoverReveal with exported types, Storybook stories, and documentation. The component renders a responsive grid of feature cards with hover/focus interactions and honors prefers-reduced-motion; stories and docs demonstrate usage, props, and accessibility notes.

Changes

Feature Grid Hover Reveal

Layer / File(s) Summary
Data Shape
animata/section/feature-grid-hover-reveal.tsx
Adds exported FeatureItem and FeatureGridProps interfaces (including `columns?: 2
Core Implementation
animata/section/feature-grid-hover-reveal.tsx
Adds default-exported client component FeatureGridHoverReveal; normalizes features, tracks hovered state per card, conditionally enables hover animations using matchMedia('(prefers-reduced-motion: reduce)').
Storybook Wiring
animata/section/feature-grid-hover-reveal.stories.tsx
Adds Storybook meta and three stories (Primary, TwoColumn, CustomContent) with example feature data and a full-width background wrapper.
Documentation
content/docs/section/feature-grid-hover-reveal.mdx
Adds MDX page with frontmatter, ComponentPreview, overview, behavior details, usage example, props table, TypeScript types, accessibility guidance, and credits.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Suggested reviewers

  • hari

Poem

🐰 Whiskers twitch with joy so bright,

Cards that lift beneath soft light,
Icons bloom and outlines glow,
Gentle pause when motions slow,
A little hop for features new — hooray!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(section): add feature grid hover reveal component' directly and clearly summarizes the main change: introducing a new Feature Grid Hover Reveal component in the section module.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@animata/section/feature-grid-hover-reveal.tsx`:
- Around line 121-125: The <article> element that uses
onMouseEnter/onMouseLeave/onFocus/onBlur to toggle setHovered is not
keyboard-focusable; update the element in feature-grid-hover-reveal.tsx (where
setHovered is used) to be focusable by adding tabIndex={0} or replace it with an
appropriate interactive element (e.g., a button or anchor) and preserve the
existing onFocus/onBlur handlers; if you replace it, ensure you keep the
setHovered calls and any necessary ARIA/role attributes to retain accessibility
and behavior.
- Around line 136-141: The Tailwind class "scale-115" in the className
expression inside the FeatureGrid hover component is invalid; replace that token
with the arbitrary value class "scale-[1.15]" wherever it's conditionally
appended (the className block that uses cn(...) with the prefersReducedMotion
and hovered variables in feature-grid-hover-reveal.tsx) so the 1.15 transform is
applied correctly when hovered and reduced-motion is not requested.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1dadec94-99de-47a9-aab6-54badf52c15d

📥 Commits

Reviewing files that changed from the base of the PR and between a5bebcd and ef6d39e.

📒 Files selected for processing (3)
  • animata/section/feature-grid-hover-reveal.stories.tsx
  • animata/section/feature-grid-hover-reveal.tsx
  • content/docs/section/feature-grid-hover-reveal.mdx

Comment on lines +121 to +125
<article
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
onFocus={() => setHovered(true)}
onBlur={() => setHovered(false)}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Make the cards actually keyboard-focusable.

onFocus/onBlur never fire on a plain <article>, so keyboard users can't trigger the reveal. Add tabIndex={0} or switch to a genuinely interactive element if keyboard reveal is required.

♻️ Suggested fix
     <article
+      tabIndex={0}
       onMouseEnter={() => setHovered(true)}
       onMouseLeave={() => setHovered(false)}
       onFocus={() => setHovered(true)}
       onBlur={() => setHovered(false)}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<article
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
onFocus={() => setHovered(true)}
onBlur={() => setHovered(false)}
<article
tabIndex={0}
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
onFocus={() => setHovered(true)}
onBlur={() => setHovered(false)}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@animata/section/feature-grid-hover-reveal.tsx` around lines 121 - 125, The
<article> element that uses onMouseEnter/onMouseLeave/onFocus/onBlur to toggle
setHovered is not keyboard-focusable; update the element in
feature-grid-hover-reveal.tsx (where setHovered is used) to be focusable by
adding tabIndex={0} or replace it with an appropriate interactive element (e.g.,
a button or anchor) and preserve the existing onFocus/onBlur handlers; if you
replace it, ensure you keep the setHovered calls and any necessary ARIA/role
attributes to retain accessibility and behavior.

Comment on lines +136 to +141
className={cn(
"flex h-11 w-11 items-center justify-center rounded-xl",
"bg-primary/10 text-primary",
"transition-transform duration-200",
!prefersReducedMotion && hovered && "scale-115",
)}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check whether Tailwind extends scale with 1.15 or already uses this utility elsewhere.
fd -a 'tailwind.config.*' .
rg -n --hidden --glob 'tailwind.config.*' 'scale.*115|extend.*scale|safelist' .
rg -n --hidden 'scale-115|scale-\[1\.15\]' animata content .

Repository: codse/animata

Length of output: 39


🏁 Script executed:

# Search for Tailwind config files with different naming patterns
find . -maxdepth 2 -type f \( -name "tailwind.config.*" -o -name "tailwind.*" \) 2>/dev/null | head -20

Repository: codse/animata

Length of output: 39


🏁 Script executed:

# Check if there's a package.json and what Tailwind version is used
cat package.json | grep -A 5 -B 5 tailwind

Repository: codse/animata

Length of output: 1486


🏁 Script executed:

# Search for scale-115 usage throughout the entire codebase
rg -i 'scale-115|scale-\[1\.15\]' --type tsx --type ts --type js --type json

Repository: codse/animata

Length of output: 85


🏁 Script executed:

# Look for any Tailwind theme extensions or safelist configurations
rg -i 'extend.*scale|scale.*extend|theme.*scale' --type tsx --type ts --type js --type json

Repository: codse/animata

Length of output: 85


🏁 Script executed:

# Check the specific file mentioned in the review
cat -n animata/section/feature-grid-hover-reveal.tsx | sed -n '130,150p'

Repository: codse/animata

Length of output: 932


🏁 Script executed:

# Search for tailwind config with various extensions
find . -maxdepth 3 -name "tailwind.config*" -o -name "tailwind.*"

Repository: codse/animata

Length of output: 39


🏁 Script executed:

# Also check for postcss config which might reference tailwind
find . -maxdepth 2 \( -name "postcss.config*" -o -name ".tailwindrc*" \)

Repository: codse/animata

Length of output: 78


🏁 Script executed:

# Search for scale extensions in the codebase using rg with correct syntax
rg 'scale.*1\.15|extend.*scale' --max-count 20

Repository: codse/animata

Length of output: 186


🏁 Script executed:

# Check if scale-115 appears anywhere in the codebase (configuration or usage)
rg 'scale-115' --max-count 20

Repository: codse/animata

Length of output: 261


🏁 Script executed:

# Look at the root directory structure to understand config location
ls -la | head -20

Repository: codse/animata

Length of output: 1249


🏁 Script executed:

cat postcss.config.mjs

Repository: codse/animata

Length of output: 203


🏁 Script executed:

# Search for any Tailwind configuration inline or in other files
rg 'theme|extend|scale' postcss.config.mjs tailwind.config.* app.css globals.css 2>/dev/null | head -40

Repository: codse/animata

Length of output: 39


🏁 Script executed:

# Check if there's a theme configuration in CSS or config files
find . -maxdepth 3 -type f \( -name "*.css" -o -name "globals*" \) | head -10

Repository: codse/animata

Length of output: 151


🏁 Script executed:

# Look for any theme or extend configurations
rg 'theme.*{' --max-count 10

Repository: codse/animata

Length of output: 137


🏁 Script executed:

cat styles/globals.css

Repository: codse/animata

Length of output: 13019


🏁 Script executed:

# Search for `@theme`, `@layer`, or theme extensions in CSS files
rg '@theme|@layer|theme\s*\{' --type css

Repository: codse/animata

Length of output: 222


🏁 Script executed:

# Look for any Tailwind configuration in app or lib directories
find . -maxdepth 3 \( -name "app.tsx" -o -name "app.ts" -o -name "layout.tsx" -o -name "config.ts" \) | head -10

Repository: codse/animata

Length of output: 98


🏁 Script executed:

# Search for 115 or 1.15 scale definitions anywhere
rg '115|1\.15' --type css --type ts --type tsx --max-count 20

Repository: codse/animata

Length of output: 85


Use scale-[1.15] instead of the non-existent scale-115 utility.

scale-115 is not a default Tailwind class and is not defined in this project's theme configuration. Use the arbitrary value syntax scale-[1.15] to apply the 1.15 scale transform on hover.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@animata/section/feature-grid-hover-reveal.tsx` around lines 136 - 141, The
Tailwind class "scale-115" in the className expression inside the FeatureGrid
hover component is invalid; replace that token with the arbitrary value class
"scale-[1.15]" wherever it's conditionally appended (the className block that
uses cn(...) with the prefersReducedMotion and hovered variables in
feature-grid-hover-reveal.tsx) so the 1.15 transform is applied correctly when
hovered and reduced-motion is not requested.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Feature Grid Hover Reveal” section component to the Animata library, along with Storybook coverage and a docs page so it can be previewed and consumed from the docs site.

Changes:

  • Introduces FeatureGridHoverReveal section component with configurable columns, default feature data, and reduced-motion detection.
  • Adds Storybook stories for default, two-column, and custom-content variants.
  • Adds documentation page for the new section.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
content/docs/section/feature-grid-hover-reveal.mdx New docs page describing the component, props/types, and accessibility notes.
animata/section/feature-grid-hover-reveal.tsx New section component implementation (grid + hover/focus reveal behavior + reduced-motion handling).
animata/section/feature-grid-hover-reveal.stories.tsx New Storybook stories to demonstrate default and customized configurations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread content/docs/section/feature-grid-hover-reveal.mdx Outdated
Comment on lines +121 to +126
<article
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
onFocus={() => setHovered(true)}
onBlur={() => setHovered(false)}
className={cn(
Comment on lines +127 to +141
"group relative flex flex-col gap-4 rounded-2xl border p-6",
"bg-card text-card-foreground",
"shadow-sm transition-shadow duration-300",
!prefersReducedMotion && "transition-transform duration-300",
!prefersReducedMotion && hovered && "-translate-y-1.5 shadow-md",
hovered ? "border-primary/40" : "border-border",
)}
>
<div
className={cn(
"flex h-11 w-11 items-center justify-center rounded-xl",
"bg-primary/10 text-primary",
"transition-transform duration-200",
!prefersReducedMotion && hovered && "scale-115",
)}
Comment on lines +8 to +15
<ComponentPreview name="section-feature-grid-hover-reveal--primary" />

## Overview

Feature Grid Hover Reveal is a polished section component for SaaS landing pages. It displays a grid of feature cards with icon, title, and description. On hover, cards lift, the border highlights, and the icon scales up using only transform and opacity. Animations are skipped when prefers-reduced-motion is enabled.

## Features

- Hover state triggered on focus and blur for keyboard access
- Decorative ring span has aria-hidden set to true
- Icon container meets 44x44px minimum touch target
- All motion respects prefers-reduced-motion
## Accessibility

- Semantic section and article elements
- Hover state triggered on focus and blur for keyboard access
@github-actions
Copy link
Copy Markdown

🚀 Preview deployed to: https://0a490af3.animata.pages.dev

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@KeenIsHere KeenIsHere temporarily deployed to preview-deployment May 3, 2026 16:24 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

🚀 Preview deployed to: https://9a7385a7.animata.pages.dev

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants