Apple Hello Effect
ncdai/apple-hello-effectUnverifiedComponent
SVG writing animation inspired by Apple’s Hello screen.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/Sumeet011/Portfolio/main/public/r/apple-hello-effect.jsonSource
1"use client"23import type { ComponentProps } from "react"4import type { TargetAndTransition } from "motion/react"5import { motion } from "motion/react"67import { cn } from "@/lib/utils"89const initialProps: TargetAndTransition = {10 pathLength: 0,11 opacity: 0,12}1314const animateProps: TargetAndTransition = {15 pathLength: 1,16 opacity: 1,17}1819export type AppleHelloEffectEnglishProps = Omit<20 ComponentProps<typeof motion.svg>,21 "durationScale" | "onAnimationComplete"22> & {23 /**24 * Scales the duration and delay of the handwriting animation.25 * Values below 1 speed up, values above 1 slow down.26 * @defaultValue 127 */28 durationScale?: number29 /** Called when the full handwriting animation completes. */30 onAnimationComplete?: () => void31}3233export function AppleHelloEffectEnglish({34 className,35 durationScale = 1,36 onAnimationComplete,37 ...props38}: AppleHelloEffectEnglishProps) {39 const calc = (x: number) => x * durationScale4041 return (42 <motion.svg43 className={cn("h-20", className)}44 xmlns="http://www.w3.org/2000/svg"45 viewBox="0 0 638 200"46 fill="none"47 stroke="currentColor"48 strokeWidth="14.8883"49 strokeLinecap="round"50 initial={{ opacity: 1 }}51 exit={{ opacity: 0 }}52 transition={{ duration: 0.5 }}53 {...props}54 >55 <title>hello</title>5657 {/* h1 */}58 <motion.path59 d="M8.69214 166.553C36.2393 151.239 61.3409 131.548 89.8191 98.0295C109.203 75.1488 119.625 49.0228 120.122 31.0026C120.37 17.6036 113.836 7.43883 101.759 7.43883C88.3598 7.43883 79.9231 17.6036 74.7122 40.9363C69.005 66.5793 64.7866 96.0036 54.1166 190.356"60 initial={initialProps}61 animate={animateProps}62 transition={{63 duration: calc(0.8),64 ease: "easeInOut",65 opacity: { duration: 0.4 },66 }}67 />6869 {/* h2, ello */}70 <motion.path71// … truncated
What it pulls in
npm packages
Files it writes
More from ncdai
All 48 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Apple Hello Effect - Hindiapple-hello-effect-hindi | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Spanishapple-hello-effect-spanish | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Vietnameseapple-hello-effect-vietnamese | ncdai | Components | Unverified | 1 dep | |
| Brand Assets Menubrand-assets-menu | ncdai | Components | Unverified | 1 dep | |
| chevrons-up-down-iconchevrons-up-down-icon | ncdai | Components | Unverified | 1 dep | |
| Code Block Commandcode-block-command | ncdai | Components | Unverified | 4 deps · 2 files | |
| Consent Managerconsent-manager | ncdai | Components | Unverified | 1 dep | |
| Contribution Graphcontribution-graph | ncdai | Components | Unverified | 1 dep |
