logoRuru UI

Animation

The Animation component is used to animate elements.

feat: improve component UI

Will change the components soon. will batter UI

Animation

The Animation component is used to animate elements.

AnimationToggle.tsx
"use client";
 
import React from "react";
import { Switch } from "@/components/ui/switch";
import { useRuru } from "@/provider";
 
const AnimationToggle = () => {
  const { setAnimation } = useRuru();
  return (
    <div className="flex items-center space-x-2">
      <Switch
        defaultChecked
        onCheckedChange={(e) => setAnimation(e)}
        id="toggle-animation"
      />
      <label htmlFor="toggle-animation"> toggle animation </label>
    </div>
  );
};
 
export default AnimationToggle;

On this page