npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cupertino-text

v1.0.3

Published

A beautiful Cupertino-style slide-down fade-in text animation effect for React applications, with Apple-style staggered animations

Readme

Cupertino Text

A beautiful Cupertino-style slide-down fade-in text animation effect for React applications, featuring Apple's signature staggered animations that create engaging visual experiences.

Features

  • 🍎 Authentic Cupertino design - Matches Apple's interface animation style
  • 🎯 Smooth exponential easing - Uses cubic-bezier curves for natural motion
  • 📱 Apple-style staggered animations - Each word/line animates with beautiful delay
  • 🔄 Intersection Observer - Triggers when element enters viewport
  • Highly customizable - Control timing, distance, stagger, and more
  • 📝 Word or line-based - Animate by individual words or entire lines
  • 🎨 CSS-in-JS - No external stylesheets needed
  • 📱 Responsive - Works great on all devices
  • 🔧 TypeScript support - Full type definitions included

Installation

Install the package via npm:

npm install cupertino-text

or

npm i cupertino-text

Usage

Import the CupertinoText component into your React application:

import React from 'react';
import CupertinoText from 'cupertino-text';

Basic Usage

By default, text will slide down and fade in word by word with Cupertino-style timing:

<CupertinoText>
  Transform your text with beautiful Cupertino animations
</CupertinoText>

Line-by-Line Animation

Use the lines prop to animate entire lines instead of individual words:

<CupertinoText lines>
  First line slides in with Cupertino elegance
  Second line follows with perfect timing
  Third line completes the sequence beautifully
</CupertinoText>

Custom Timing and Effects

Customize the animation with various props:

<CupertinoText 
  delay={200}
  duration={1000}
  stagger={120}
  distance={80}
>
  Customize every aspect of the Cupertino animation
</CupertinoText>

With Custom Styling

Apply your own styles using className or style props:

<CupertinoText 
  className="my-custom-text"
  style={{ 
    fontSize: '2rem', 
    fontWeight: 'bold',
    color: '#007AFF'  // Cupertino blue
  }}
>
  Styled Cupertino animated text
</CupertinoText>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | children | ReactNode | - | The text or content to animate | | delay | number | 0 | Initial delay before animation starts (ms) | | duration | number | 800 | Duration of each element's animation (ms) | | stagger | number | 80 | Delay between each word/line animation (ms) | | distance | number | 60 | Distance elements slide from (px) | | className | string | '' | Additional CSS classes | | style | CSSProperties | {} | Inline styles for the container | | lines | boolean | false | Animate by lines instead of words | | triggerOnce | boolean | true | Whether to trigger animation only once |

Animation Details

The component uses authentic Cupertino design principles:

  • Cubic-bezier easing: cubic-bezier(0.25, 0.46, 0.45, 0.94) for Apple's signature smooth motion
  • Intersection Observer: Automatically triggers when element becomes visible
  • Transform-based animation: Uses translateY for better performance
  • Staggered timing: Each word/line has progressively longer delay, just like in Apple's interfaces

Examples

Hero Section

<CupertinoText 
  duration={1200}
  stagger={100}
  style={{ fontSize: '3rem', fontWeight: '700' }}
>
  Welcome to the Future
</CupertinoText>

Feature List

<CupertinoText 
  lines
  delay={300}
  stagger={150}
>
  ✨ Beautiful Cupertino animations
  🚀 Easy to implement  
  🎨 Fully customizable
</CupertinoText>

Marketing Copy

<CupertinoText 
  duration={600}
  stagger={60}
  distance={40}
>
  Experience the magic of smooth Cupertino text animations that captivate your users
</CupertinoText>

Apple-style Product Showcase

<CupertinoText 
  lines
  duration={900}
  stagger={200}
  style={{ 
    fontSize: '2.5rem', 
    fontWeight: '600',
    color: '#1d1d1f'
  }}
>
  iPhone 15 Pro
  Titanium. So strong. So light.
  So Pro.
</CupertinoText>

Performance

  • Uses transform and opacity for GPU-accelerated animations
  • Intersection Observer prevents animations on hidden elements
  • Minimal bundle size with no external dependencies
  • Optimized for 60fps animations, matching Apple's standards

Browser Support

  • Chrome/Edge 51+
  • Firefox 55+
  • Safari 12.1+
  • iOS Safari 12.2+

Dependencies

Peer Dependencies:

  • React: >=16.8.0
  • react-dom: >=16.8.0

Make sure your project has compatible versions of React installed.

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you encounter any issues or have questions, feel free to open an issue on the GitHub repository.


Bring Apple's signature animation style to your React applications with cupertino-text! 🍎✨