Chevrons Up Down Icon
Animated chevrons icon that morphs between up and down directions.
Installation
Install-Module cnpx -Scope CurrentUser -Force; Import-Module cnpx; cnpx add @chadnpc/chevrons-up-down-iconUsage
import { useRef } from "react"
import {
ChevronsUpDownIcon,
ChevronsUpDownIconHandle,
} from "@/components/chevrons-up-down-icon"const chevronsUpDownIconRef = useRef<ChevronsUpDownIconHandle>(null)<ChevronsUpDownIcon ref={chevronsUpDownIconRef} />Trigger the morph imperatively through the ref:
chevronsUpDownIconRef.current?.startAnimation() // morph to chevrons-down-up
chevronsUpDownIconRef.current?.stopAnimation() // morph back to chevrons-up-down