Sleeping Cat

A whimsical screen saver featuring a sleeping cat and clock animation.

Preview

Sleeping Cat

Refinery

13:19
Wed May 20 2026

( Move your cursor to wake up the screen )

Installation

1. Run the following command in your terminal:
npx shadcn@latest add @refinery/sleeping-cat-screensaver

API Reference

Component props
NameTypeDescription
bgColorstringBackground color class for the screen.
brandTextstringBrand label above the clock.
imageSrcstringImage URL for the sleeping cat.
imageAltstringAlt text for the cat image.

Usage Recommendations

For the best experience, use the 'Geist' theme...
Always ensure the component is properly styled and accessible.
Design Notes

The design here is simple, with overall idea to keep it very minimal and clean screen-saver variant with a 'cute' feel. The main animation is the clock, which is implemented by using 'requestAnimationFrame' to update the time every second. We calculate the current time and format it as a string to display. The seconds progress bar is implemented by calculating how far through the current minute we are and animating the width of a div accordingly. The sleeping cat image is styled with a gentle pulse animation to give it some life without being distracting. The entire screen saver fades in and out smoothly using Motion animation. A subtle instruction text is included at the bottom to inform users how to exit the screen saver mode. The component accepts 'bgColor' and 'brandText' as props. The 'bgColor' prop allows you to customize the background color of the screen saver (recommended to keep light color shades matching the brand-theme), while the 'brandText' prop lets you display your brand name or any custom text above the clock for a personalized touch.