1.0.13 • Published 5 months ago

react-ai-orb v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

react-ai-orb downloads

A beautiful, customizable animated orb component for React applications! Perfect for AI interfaces, assistants, interactive chatbots, or anywhere you need a glowing orb. 🔮✨

npm i react-ai-orb

💻 Usage

import { Orb } from "react-ai-orb";

const MyComponent = () => (
  return  <Orb />
);

⚛️ Next JS

The component needs to be imported like this:

"use client";
import { Orb } from "react-ai-orb";

⚙️ Props

PropTypeDefaultDescription
paletteOrbPalettecosmicNebulaDefines the color palette for the orb. Use predefined palettes or create custom ones.
sizenumber1Sets the size of the orb.
animationSpeedBasenumber1Determines the base speed of the rotation animation.
animationSpeedHuenumber1Sets the speed of the hue animation.
hueRotationnumber120Adjusts the hue rotation degree for the orb colors.
mainOrbHueAnimationbooleanfalseEnables or disables the hue animation on the main orb.
blobAOpacitynumber0.3Controls the opacity of blob A (range: 0 to 1).
blobBOpacitynumber0.8Controls the opacity of blob B (range: 0 to 1).
noShadowbooleanfalseDisables the Orb's shadow when set to true.

🎨 Palette

PropertyTypeDescription
mainBgStartstringThe starting color of the orb's main background gradient.
mainBgEndstringThe ending color of the orb's main background gradient.
shadowColor1stringThe first shadow color applied to the orb.
shadowColor2stringThe second shadow color applied to the orb.
shadowColor3stringThe third shadow color applied to the orb.
shadowColor4stringThe fourth shadow color applied to the orb.
shapeAStartstringThe starting color of shape A.
shapeAEndstringThe ending color of shape A.
shapeBStartstringThe starting color of shape B.
shapeBMiddlestringThe middle color of shape B.
shapeBEndstringThe ending color of shape B.
shapeCStartstringThe starting color of shape C.
shapeCMiddlestringThe middle color of shape C.
shapeCEndstringThe ending color of shape C.
shapeDStartstringThe starting color of shape D.
shapeDMiddlestringThe middle color of shape D.
shapeDEndstringThe ending color of shape D.

📦 Presets

const MyComponent = () => ( return <Orb {...oceanDepthsPreset} /> );

### Included Presets
- 🪼 `oceanDepthsPreset`
- 🌌 `galaxyPreset`
- 🌊 `caribeanPreset`
- 🌸 `cherryBlossomPreset`
- ❇️ `emeraldPreset`
- 🦄 `multiColorPreset`
- ☀️ `goldenGlowPreset`


## 👨‍💻 Development

npx rollup -c

## 🤝 Contributing
Feel free to open issues or submit PRs for new features, bug fixes, or documentation improvements.