In my react app i wanted to create a circular/curved text. for this i found a package called react-curved-text
. but this package is not working as i wanted.
the thing is it curves the text, but it doesn't align itself with the parent, and when i try to apply animation to it using tailwindcss it doesn't work. it can not be added a classname to it. so how can i create circular text using react?
<ReactCurvedText
width={370}
height={300}
cx={190}
cy={120}
rx={80}
ry={80}
startOffset={0}
reversed={true}
text="Sanah Shop - Sanah shop - Sanah shop - Sanah shop - "
textProps={{ style: { fontSize: 20.5, transform: "rotate(0deg)" } }}
className="rotater absolute top-0 bottom-10"
/>
tailwind.config.js
theme: {
extend: {
keyframes: {
wiggle: {
"0%, 100%": { transform: "rotate(360deg)" },
"50%": { transform: "rotate(0deg)" },
},
spinner: {
"0%": { transform: "rotate(360deg)" },
"100%": { transform: "rotate(0deg)" },
},
},
animation: {
rotater: "spinner 10s linear infinite",
wiggle: "wiggle 10s linear infinite",
},
},
},
the final result should be