Sleep Score

Sleep Score: Sleep score in the DND face layout — sleeping mascot at the bottom, score and quality above, duration tucked below. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.

Install Sleep Score

npx motion-ui-skill add sleep-score

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

Dependencies

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

Source files

Sleep Score

Sleep score in the DND face layout — sleeping mascot at the bottom, score and quality above, duration tucked below.

Install

npx motion-ui-skill add sleep-score

Dependencies

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

Usage

"use client";

import { SleepScoreWidget } from "@/components/widgets/sleep-score-widget";

export function SleepScoreWidgetDemo() {
  return (
    <div className="flex items-center justify-center p-6">
      <SleepScoreWidget />
    </div>
  );
}

API Reference

SleepScoreWidget

Prop Type Default Required Description
className string — No Additional CSS classes

Browse this category