𝐓𝐨𝐝𝐚𝐲 𝐈 𝐩𝐮𝐛𝐥𝐢𝐬𝐡𝐞𝐝 𝐦𝐲 𝐟𝐢𝐫𝐬𝐭 𝐧𝐩𝐦 𝐩𝐚𝐜𝐤𝐚𝐠𝐞 🎉 𝗖𝗵𝗲𝗰𝗸 𝗶𝘁 𝗼𝘂𝘁 𝗵𝗲𝗿𝗲: https://lnkd.in/dJAJZBG2 𝗪𝗵𝗮𝘁 𝗽𝗿𝗼𝗯𝗹𝗲𝗺 𝗜 𝗳𝗮𝗰𝗲𝗱? In React Native, we can’t create gradient text with just <Text />. Every time we need to use: • MaskedView • react-native-linear-gradient • absolute positioning • invisible text for layout sizing It’s repetitive, easy to mess up and honestly… not clean. Every new project, same setup again and again. 𝗦𝗼 𝘄𝗵𝗮𝘁 𝗜 𝗱𝗶𝗱? I created a simple reusable component. 𝗡𝗼𝘄 𝘆𝗼𝘂 𝗷𝘂𝘀𝘁: • Import the component • Pass colors, start, end • Or disable gradient with showGradient={false} • Use normal Text props That’s it. Clean. Reusable. Typed with TypeScript. No more repeating complex setup in every screen. 𝗛𝗼𝘄 𝘆𝗼𝘂 𝗰𝗮𝗻 𝗯𝗲𝗻𝗲𝗳𝗶𝘁? If you are building: • Landing screens • Premium UI • Highlighted titles • Branding text You can now add gradient text in seconds. No headache. No layout hacks. This is my first npm package, so your feedback means a lot. If you try it, let me know what I can improve. 𝗪𝗵𝗮𝘁 𝘀𝗺𝗮𝗹𝗹 𝗽𝗿𝗼𝗯𝗹𝗲𝗺 𝗶𝗻 𝗥𝗲𝗮𝗰𝘁 𝗡𝗮𝘁𝗶𝘃𝗲 𝗶𝘀 𝗮𝗻𝗻𝗼𝘆𝗶𝗻𝗴 𝘆𝗼𝘂 𝘁𝗵𝗲𝘀𝗲 𝗱𝗮𝘆𝘀 𝘁𝗵𝗮𝘁 𝘆𝗼𝘂 𝘄𝗶𝘀𝗵 𝗵𝗮𝗱 𝗮 𝘀𝗶𝗺𝗽𝗹𝗲 𝗿𝗲𝘂𝘀𝗮𝗯𝗹𝗲 𝘀𝗼𝗹𝘂𝘁𝗶𝗼𝗻? 👀 #ReactNative #JavaScript #OpenSource #MobileDevelopment #npm
I made components for this many times in my rn project.. would just have to pass some colours and it would eventually made a gradient of those...
This component is not working as expected on the android side. It shows a gradient flicker when we navigate back.