Signal Low Icon

PreviousNext

Signal low icon component.

Docs
animate-uiui

Preview

Loading preview…
registry/icons/signal-low/index.tsx
'use client';

import * as React from 'react';
import { motion, type Variants } from 'motion/react';

import {
  getVariants,
  useAnimateIconContext,
  IconWrapper,
  type IconProps,
} from '@/components/animate-ui/icons/icon';

type SignalLowProps = IconProps<keyof typeof animations>;

const pathAnimation: Variants = {
  initial: {
    pathLength: 1,
    opacity: 1,
  },
  animate: {
    pathLength: [0, 1],
    opacity: [0, 1],
    transition: {
      duration: 0.3,
      ease: 'easeInOut',
    },
  },
};

const animations = {
  default: {
    group: {
      initial: {},
      animate: {
        transition: {
          staggerChildren: 0.2,
        },
      },
    },
    path1: pathAnimation,
    path2: pathAnimation,
  } satisfies Record<string, Variants>,
} as const;

function IconComponent({ size, ...props }: SignalLowProps) {
  const { controls } = useAnimateIconContext();
  const variants = getVariants(animations);

  return (
    <motion.svg
      xmlns="http://www.w3.org/2000/svg"
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      strokeWidth={2}
      strokeLinecap="round"
      strokeLinejoin="round"
      variants={variants.group}
      initial="initial"
      animate={controls}
      {...props}
    >
      <motion.path d="M2 20h.01" variants={variants.path1} />
      <motion.path d="M7 20v-4" variants={variants.path2} />
    </motion.svg>
  );
}

function SignalLow(props: SignalLowProps) {
  return <IconWrapper icon={IconComponent} {...props} />;
}

export {
  animations,
  SignalLow,
  SignalLow as SignalLowIcon,
  type SignalLowProps,
  type SignalLowProps as SignalLowIconProps,
};

Installation

npx shadcn@latest add @animate-ui/icons-signal-low

Usage

import { IconsSignalLow } from "@/components/ui/icons-signal-low"
<IconsSignalLow />