Skip to main content

Installation

npx inspira-ui@latest add smooth-cursor

Usage

<template>
  <SmoothCursor
    :cursor="CustomCursor"
    :springConfig="{
      damping: 20,
      stiffness: 300,
      mass: 0.5,
      restDelta: 0.001
    }"
  />
</template>

<script setup lang="ts">
import SmoothCursor from "@/components/inspira/ui/cursors/SmoothCursor.vue";
import CustomCursor from "./CustomCursor.vue";
</script>

Props

Prop NameTypeDefaultDescription
cursorComponentDefaultCursorCustom cursor component to replace the default cursor
springConfigSpringConfigSee belowConfiguration object for the spring animation behavior.

SpringConfig Type

interface springConfig {
  damping: number;
  stiffness: number;
  mass: number;
  restDelta: number;
}

Credits

Build docs developers (and LLMs) love