Back to AIX Effects LibraryQA Verified · Synced
Layout & Gallery/<FocusGallery />·Beginner

Focus Gallery

Guides user attention effortlessly across comparison tiers, showcases, or case study collections with zero dependencies.

Next.js 16+React 19TypeScriptTailwind CSSZero External Deps
Hover or focus any card below
01 · OPTIC
Precision Card

Sharp contrast when focused.

02 · DEPTH
Neighbor Dimming

Sibling cards step back calmly.

03 · PURE CSS
Zero Packages

Works across mouse, touch & keyboard.

blur 2.5px · dim 0.42 · scale 1.03

Hover or tap individual cards to isolate focal attention.

Installation

Zero External Dependencies

Zero external dependencies required.

Usage

import { FocusGallery } from '@/components/effects/library/layout/FocusGallery'

<FocusGallery
  blurAmountPx={2.5}
  dimOpacity={0.42}
  focusScale={1.03}
  items={[
    { id: '1', tag: 'LAYER 01', title: 'Optic Sharpness', subtitle: 'Tập trung điểm nhìn tức thì.', accent: '#536dfe' },
    { id: '2', tag: 'LAYER 02', title: 'Depth Separation', subtitle: 'Làm dịu thẻ ngoài vùng đọc.', accent: '#8765f7' },
    { id: '3', tag: 'LAYER 03', title: 'Zero Bloat', subtitle: 'Chuyển mượt bằng CSS thuần.', accent: '#30bfef' },
  ]}
/>

Props & API Reference

4 props
PropTypeDefaultDescriptionEffect
itemsFocusGalleryCard[](required)Cards rendered inside horizontal grid.Each item carries unique tag, caption, and accent tint.
blurAmountPxnumber2.5Gaussian blur radius applied to dimmed sibling tiles.Adjusts background sibling softness.
dimOpacitynumber0.42Target opacity for inactive neighbor cards.Tunes sibling recession level.
focusScalenumber1.03Transform scale boost applied to focused tile.Elevates active tile.

More in Layout & Gallery

View All 36 →
Click any grid card to expand focus span
stiffness: 340 · damping: 28

Expandable Grid

Interactive 2-column Bento showcase that expands selected cards smoothly with spring reflow.

View Details
Hover horizontally or drag slider
01 · Foreground
Primary Layer
02 · Midground
Offset Plane
03 · Horizon
Deep Axis

Depth Parallax Gallery

Three-layer card deck translating horizontally at proportional depth speeds inside perspective space.

View Details
Wheel scroll, drag, or scrub track0%
01 / FRAME
Modular Deck
Snap-x rail track
02 / SKEW
Velocity Lean
±6deg inertia
03 / WHEEL
Smart Wheel
Auto edge release
04 / MOBILE
Touch Drag
Mandatory scroll snap
skewStrength: 6deg

Horizontal Scroll Gallery

Smooth wheel-to-horizontal showcase strip with velocity skew inertia and progress bar.

View Details