Skip to Content
🎉Introducing Pumki UI
Custom AssetsCurved Arrow

Custom Curved Arrow

Pumki UIPumki UI

Installation

Usage


import { CustomCurvedArrow } from '@/components/pumki-ui/sections/timeline/custom-curved-arrow.tsx';

1<CustomCurvedArrow />

Example

Pumki UIPumki UI
Pumki UIPumki UI

Props

PropTypeDefaultDescription
startElementReact.RefObject<HTMLElement> | nullrequiredReference to the element where the arrow starts.
endElementReact.RefObject<HTMLElement> | nullrequiredReference to the element where the arrow ends.
obstacleElementReact.RefObject<HTMLElement> | nullundefinedOptional reference to an obstacle element for path calculation.
startXnumber0Manual X coordinate for the start point (overrides element if provided).
startYnumber0Manual Y coordinate for the start point (overrides element if provided).
endXnumber100Manual X coordinate for the end point (overrides element if provided).
endYnumber100Manual Y coordinate for the end point (overrides element if provided).
curveIntensitynumber0.4Controls the strength of the curve between start and end.
curveType”smooth” | “dramatic” | “s-curve” | “wave” | “spiral” | “elegant” | “shortest-path” | “around-obstacle""smooth”Type of curve used for the arrow path.
curveDirection”auto” | “up” | “down” | “left” | “right""auto”Direction preference for the curve.
strokeWidthnumber4Width of the arrow stroke.
arrowSizenumber20Size of the arrow head.
classNamestring""Custom CSS classes for the container.
animatedbooleanundefinedIf true, enables arrow animation (not implemented in current code).
startPosition”top” | “bottom” | “left” | “right” | “center” | “top-left” | “top-right” | “bottom-left” | “bottom-right""bottom”Anchor position on the start element.
endPosition”top” | “bottom” | “left” | “right” | “center” | “top-left” | “top-right” | “bottom-left” | “bottom-right""top”Anchor position on the end element.
Last updated on