@arolariu/components
Version:
🎨 60+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
83 lines (82 loc) • 3.27 kB
JavaScript
"use client";
;
var __webpack_require__ = {};
(()=>{
__webpack_require__.d = (exports1, definition)=>{
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
enumerable: true,
get: definition[key]
});
};
})();
(()=>{
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
__webpack_require__.r = (exports1)=>{
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
value: 'Module'
});
Object.defineProperty(exports1, '__esModule', {
value: true
});
};
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
GradientText: ()=>GradientText
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const external_react_namespaceObject = require("react");
const react_namespaceObject = require("motion/react");
const utils_cjs_namespaceObject = require("../../lib/utils.cjs");
const GradientText = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ text, className, gradient = "linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)", neon = false, transition = {
duration: 50,
repeat: 1 / 0,
ease: "linear"
}, ...props }, ref)=>{
const baseStyle = {
backgroundImage: gradient
};
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
ref: ref,
className: (0, utils_cjs_namespaceObject.cn)("relative inline-block", className),
...props,
children: [
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_namespaceObject.motion.span, {
className: "m-0 text-transparent bg-clip-text bg-[length:700%_100%] bg-[position:0%_0%]",
style: baseStyle,
initial: {
backgroundPosition: "0% 0%"
},
animate: {
backgroundPosition: "500% 100%"
},
transition: transition,
children: text
}),
neon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_namespaceObject.motion.span, {
className: "m-0 absolute top-0 left-0 text-transparent bg-clip-text blur-[8px] mix-blend-plus-lighter bg-[length:700%_100%] bg-[position:0%_0%]",
style: baseStyle,
initial: {
backgroundPosition: "0% 0%"
},
animate: {
backgroundPosition: "500% 100%"
},
transition: transition,
children: text
})
]
});
});
GradientText.displayName = "GradientText";
exports.GradientText = __webpack_exports__.GradientText;
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
"GradientText"
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
Object.defineProperty(exports, '__esModule', {
value: true
});
//# sourceMappingURL=gradient-text.cjs.map