Orbit

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

Examples

Synchronized orbit

API

Prop NameTypeDefaultDescription
directionnormal | reversenormalThe direction of the orbit. You can use the constant ORBIT_DIRECTION.
duration?number20The duration of the orbit animation in seconds.
delay?number10Delay in seconds before the animation starts.
radius?number50Radius of the orbit path in pixels.
path?booleanfalseDisplays a circle path for the orbit if true.

Component Code

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

Orbit.vue
index.ts

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 reverse by setting the direction prop.
  • Responsive and Efficient: The component handles different container sizes and uses Vue’s reactivity to ensure efficient animation.

Credits