@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! ⚡
1 lines • 3.1 kB
Source Map (JSON)
{"version":3,"file":"components\\ui\\gradient-background.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/gradient-background.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport * as React from \"react\";\nimport { HTMLMotionProps, motion, type Transition } from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface GradientBackgroundProps extends HTMLMotionProps<\"div\"> {\n transition?: Transition;\n}\n\nconst GradientBackground = React.forwardRef<\n HTMLDivElement,\n GradientBackgroundProps\n>(\n (\n {\n className,\n transition = { duration: 15, ease: \"easeInOut\", repeat: Infinity },\n ...props\n },\n ref,\n ) => {\n return (\n <motion.div\n ref={ref}\n className={cn(\n \"size-full bg-gradient-to-br from-blue-500 via-purple-500 to-pink-500 bg-[length:400%_400%]\",\n className,\n )}\n animate={{\n backgroundPosition: [\"0% 50%\", \"100% 50%\", \"0% 50%\"],\n }}\n transition={transition}\n {...props}\n />\n );\n },\n);\n\nGradientBackground.displayName = \"GradientBackground\";\n\nexport { GradientBackground, type GradientBackgroundProps };\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","GradientBackground","React","className","transition","Infinity","props","ref","motion","cn"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,sBAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;ACKA,MAAMI,qBAAqB,WAArBA,GAAqBC,+BAAAA,UAAgB,CAIzC,CACE,EACEC,SAAS,EACTC,aAAa;IAAE,UAAU;IAAI,MAAM;IAAa,QAAQC;AAAS,CAAC,EAClE,GAAGC,OACJ,EACDC,MAGE,WADF,GACE,qCAACC,sBAAAA,MAAAA,CAAAA,GAAU;QACT,KAAKD;QACL,WAAWE,IAAAA,0BAAAA,EAAAA,EACT,8FACAN;QAEF,SAAS;YACP,oBAAoB;gBAAC;gBAAU;gBAAY;aAAS;QACtD;QACA,YAAYC;QACX,GAAGE,KAAK;;AAMjBL,mBAAmB,WAAW,GAAG"}