Orbit

A component that animates content in a circular orbit, with customizable duration, delay, and radius. It also offers an optional orbit path display.

API

Prop NameTypeDefaultDescription
reversebooleanfalseReverses the orbit direction if true.
durationnumber20The duration of the orbit animation in seconds.
delaynumber10Delay in seconds before the animation starts.
radiusnumber50Radius of the orbit path in pixels.
pathbooleantrueDisplays a circle path for the orbit if true.

Component Code

You can copy and paste the following code to create this component:

Orbit.vue

Features

  • Circular Orbit Animation: The component animates its content in a smooth circular orbit around the center point.
  • Customizable Animation: The orbit’s duration, delay, and radius are fully adjustable, providing flexibility in animation behavior.
  • Optional Orbit Path: An optional visual representation of the orbit path can be toggled using the path prop.
  • Reversibility: The orbit direction can be reversed by setting the reverse prop to true.
  • Responsive and Efficient: The component handles different container sizes and uses Vue’s reactivity to ensure efficient animation.

Credits