Animated chevrons icon that morphs between up and down directions.
motion-sv
Installation
Install dependencies
Install the required packages for this component:
Copy the Source Code
Copy and paste the following code into your project:
chevrons-up-down-icon.svelte
index.ts
Features
- Animated chevrons icon that morphs between up and down directions
- Imperative ref control via startAnimation and stopAnimation methods
- Based on the Lucide chevrons-up-down icon
Props
ChevronsUpDownIcon
Animated SVG chevrons controlled through the component handle.
| Name | Type | Default | Description |
|---|---|---|---|
duration | number | 0.3 | Duration of the path morph animation in seconds. |
ref | SVGSVGElement | null | null | Bindable reference to the SVG element. |
class | string | undefined | Additional classes applied to the SVG element. |