Focus Mode

Focus Mode: An atmospheric focus-mode interaction that isolates selected cards or sections by smoothly dimming surrounding distractions with zero layout shift, tactile spring scaling, and Escape key dismissal. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.

Install Focus Mode

npx motion-ui-skill add focus-mode

Components install as source into your project. The interactive page also includes preview, code, documentation and install tabs.

Dependencies

  • clsx
  • lucide-react
  • motion
  • react
  • tailwind-merge

Source files

Focus Mode

An atmospheric focus-mode interaction that isolates selected cards or sections by smoothly dimming surrounding distractions with zero layout shift, tactile spring scaling, and Escape key dismissal.

Install

npx motion-ui-skill add focus-mode

Dependencies

  • clsx
  • lucide-react
  • motion
  • react
  • tailwind-merge

Usage

"use client";

import { FocusMode as FocusMode } from "@/components/craft/focus-mode";

export function Example() {
  return (
    <div className="p-6">
      <FocusMode />
    </div>
  );
}

Browse this category