BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/lucide-animated/align-vertical

align-vertical

lucide-animated-icons/align-vertical
FreeComponent

lucide-animated publishes no description for this item.

Install it

npx shadcn@latest add https://icons.pqoqubbw.dev/r/align-vertical.json

Source

align-vertical.tsxicons.pqoqubbw.dev/r/align-vertical.json
1"use client";
2
3import type { Transition } from "motion/react";
4import { motion, useAnimation } from "motion/react";
5import type { HTMLAttributes } from "react";
6import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
7
8import { cn } from "@/lib/utils";
9
10export interface AlignVerticalIconHandle {
11 startAnimation: () => void;
12 stopAnimation: () => void;
13}
14
15interface AlignVerticalIconProps extends HTMLAttributes<HTMLDivElement> {
16 size?: number;
17}
18
19const DEFAULT_TRANSITION: Transition = {
20 type: "spring",
21 stiffness: 160,
22 damping: 17,
23 mass: 1,
24};
25
26const AlignVerticalIcon = forwardRef<
27 AlignVerticalIconHandle,
28 AlignVerticalIconProps
29>(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
30 const controls = useAnimation();
31 const isControlledRef = useRef(false);
32
33 useImperativeHandle(ref, () => {
34 isControlledRef.current = true;
35
36 return {
37 startAnimation: () => controls.start("animate"),
38 stopAnimation: () => controls.start("normal"),
39 };
40 });
41
42 const handleMouseEnter = useCallback(
43 (e: React.MouseEvent<HTMLDivElement>) => {
44 if (isControlledRef.current) {
45 onMouseEnter?.(e);
46 } else {
47 controls.start("animate");
48 }
49 },
50 [controls, onMouseEnter]
51 );
52
53 const handleMouseLeave = useCallback(
54 (e: React.MouseEvent<HTMLDivElement>) => {
55 if (isControlledRef.current) {
56 onMouseLeave?.(e);
57 } else {
58 controls.start("normal");
59 }
60 },
61 [controls, onMouseLeave]
62 );
63
64 return (
65 <div
66 className={cn(className)}
67 onMouseEnter={handleMouseEnter}
68 onMouseLeave={handleMouseLeave}
69 {...props}
70 >
71 <svg
72 fill="none"
73 height={size}
74 stroke="currentColor"
75 strokeLinecap="round"
76 strokeLinejoin="round"
77 strokeWidth="2"
78 viewBox="0 0 24 24"
79 width={size}
80 xmlns="http://www.w3.org/2000/svg"
81 >
82 <motion.rect
83 animate={controls}
84 height="6"
85 rx="2"
86 transition={DEFAULT_TRANSITION}
87 variants={{
88 normal: { scaleY: 1 },
89 animate: { scaleY: 0.8 },
90 }}
91 width="10"
92 x="7"
93 y="9"
94 />
95 <motion.path
96 animate={controls}
97 d="M22 20H2"
98 transition={DEFAULT_TRANSITION}
99 variants={{
100 normal: { translateY: 0, scaleX: 1 },
101 animate: {
102 translateY: -2,
103// … truncated

What it pulls in

npm packages

  • motion

Files it writes

  • align-vertical.tsx

Facts

Registry
lucide-animated
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-03
Last confirmed
today

Go to the source

icons.pqoqubbw.dev Raw registry item This item as JSON

More from lucide-animated

All 466 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
a-arrow-downa-arrow-downlucide-animatedComponentsFree1 dep
a-arrow-upa-arrow-uplucide-animatedComponentsFree1 dep
accessibilityaccessibilitylucide-animatedComponentsFree1 dep
activityactivitylucide-animatedComponentsFree1 dep
air-ventair-ventlucide-animatedComponentsFree1 dep
airplaneairplanelucide-animatedComponentsFree1 dep
airplayairplaylucide-animatedComponentsFree1 dep
alarm-clockalarm-clocklucide-animatedComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex