Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

docs: add section for hiding default browser cursor in SmoothCursor docs (#724)

Pankaj Gupta79c368299f5b
diff --git a/content/docs/components/smooth-cursor.mdx b/content/docs/components/smooth-cursor.mdx
index bbcc3829..c654a543 100644
--- a/content/docs/components/smooth-cursor.mdx
+++ b/content/docs/components/smooth-cursor.mdx
@@ -71,6 +71,35 @@ import { SmoothCursor } from "@/components/ui/smooth-cursor";
<SmoothCursor />
```
+## Hiding Default Browser Cursor
+
+To prevent the default browser cursor from overlapping with the custom cursor, add the following CSS globally:
+
+```css
+* {
+ cursor: none !important;
+}
+```
+
+### Optional: Keep text cursor for inputs
+
+```css
+input,
+textarea,
+select {
+ cursor: text !important;
+}
+```
+
+💡 If you're using Tailwind CSS, you can add cursor-none to your layout wrapper:
+
+```tsx
+<div className="cursor-none">
+ <SmoothCursor />
+ {/* your app */}
+</div>
+```
+
## Props
| Prop | Type | Default | Description |