I’ve been using shadcn/ui in most of my projects lately, and it got me thinking: could I build something like that from scratch? I wanted to push my design sense and understand how to build high-quality, reusable components with those smooth micro-interactions that make a site feel "alive." It also serves as a part of my portfolio, so I decided to build PhexarUI. It’s a collection of React components built on Tailwind v4 and Motion. Just like shadcn, there’s no bulky npm package to manage, you just copy-paste the code or use the CLI to add them to your project, so you fully own the source. This was mostly a way for me to practice and get better at frontend architecture, but I’m happy with how the first version turned out. If you're looking for some clean components to drop into your next project, feel free to check it out! 🔗 Docs: https://lnkd.in/gx7vpE3k I’m planning to keep adding more to this as I learn. #ReactJS #NextJS #TailwindCSS #motion #WebDevelopment #PhexarUI
Building PhexarUI, a Custom React Component Library
More Relevant Posts
-
🚀React’s Virtual DOM When I started learning React, one concept that completely changed how I think about UI performance was the Virtual DOM. Instead of updating the real DOM directly, React creates a lightweight copy of it in memory called the Virtual DOM. Here’s how it works: 🔹 Render Virtual DOM React first creates a virtual representation of the UI using JavaScript objects. 🔹 State Change When the application state changes, React creates a new Virtual DOM tree. 🔹 Diffing React compares the new tree with the previous one using an efficient diffing algorithm. 🔹 Update Real DOM Only the necessary changes are applied to the actual DOM. 💡 Why this matters • Faster UI updates • Avoids full DOM re-rendering • Efficient reconciliation process • Batched state updates • Better performance for complex apps The result: smarter rendering and faster applications. Frontend engineering becomes much easier when you understand what happens behind the scenes. What concept in React took you the longest to understand? 👇 #React #JavaScript #WebDevelopment #FrontendDevelopment #SoftwareEngineering
To view or add a comment, sign in
-
Just tried something new in frontend… and I’m kinda liking it 😄 I recently started using shadcn/ui in a real React project, and honestly—it feels different. In a good way. As someone still growing in frontend, I remember how confusing UI libraries used to feel… 👉 Too many props 👉 Theme overrides everywhere 👉 Docs open in 10 tabs just to change one color 😅 But this time? It felt… simple. I ran a CLI command, got actual components inside my project, and suddenly I wasn’t using a UI library… I was working with my own UI code. Here’s what clicked for me 👇 🚀 No more black box The components are right there in my /components folder. I can read them, tweak them, break them (and fix them 😄). 🎨 Consistent design without stress Buttons, forms, dialogs—everything just looks like it belongs together. No random styling battles. 🧩 Feels scalable (even for beginners) I’m not fighting the library. I’m slowly understanding how to build my own UI layer on top of it. Honestly, the biggest change isn’t the UI… It’s the feeling of control. For the first time, frontend doesn’t feel like “adjusting someone else’s system”— It feels like I’m building my own. 💻✨ Curious— Are you still installing UI libraries… or starting to own your UI as well? 👇 #ReactJS #FrontendDevelopment #shadcnui #TailwindCSS #WebDevJourney
To view or add a comment, sign in
-
For a long time, I tried to stop React from re-rendering. Turns out, I was solving the wrong problem. React is already fast at rendering. The real issue isn’t re-renders—it’s 𝐰𝐡𝐚𝐭 𝐲𝐨𝐮 𝐝𝐨 𝐝𝐮𝐫𝐢𝐧𝐠 𝐞𝐚𝐜𝐡 𝐫𝐞𝐧𝐝𝐞𝐫. If your component runs expensive logic every time it renders, performance will suffer no matter how many optimizations you add. A simple example: const sortedUsers = users.sort((a, b) => a.age - b.age) This runs on every render. A better approach: const sortedUsers = useMemo( () => users.slice().sort((a, b) => a.age - b.age), [users] ) Now the sorting only happens when `users` actually change. This small shift changed how I think about performance. The goal is not fewer renders—it’s 𝐥𝐞𝐬𝐬 𝐰𝐨𝐫𝐤 𝐩𝐞𝐫 𝐫𝐞𝐧𝐝𝐞𝐫. Once you focus on that, tools like `useMemo` and `useCallback` start making sense instead of being overused blindly. 💡 Here’s what I apply in real projects: ✔️ Avoid heavy computations directly inside render ✔️ Use `useMemo` only for expensive operations ✔️ Measure before optimizing—don’t guess React performance isn’t about tricks. It’s about understanding where the real cost is. 💬 𝐖𝐡𝐞𝐧 𝐝𝐢𝐝 𝐑𝐞𝐚𝐜𝐭 𝐩𝐞𝐫𝐟𝐨𝐫𝐦𝐚𝐧𝐜𝐞 𝐟𝐢𝐧𝐚𝐥𝐥𝐲 “𝐜𝐥𝐢𝐜𝐤” 𝐟𝐨𝐫 𝐲𝐨𝐮? 👉 Follow Usman Ahmed for more Updates! #ReactJS #FrontendEngineering #WebPerformance #JavaScript #CleanCode #SoftwareEngineering #ReactHooks
To view or add a comment, sign in
-
-
𝗠𝗼𝘀𝘁 𝗥𝗲𝗮𝗰𝘁 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀 𝗢𝘃𝗲𝗿𝘂𝘀𝗲 𝘂𝘀𝗲𝗦𝘁𝗮𝘁𝗲 Not everything in React needs to be state. But many developers still store everything in useState. That leads to: • Unnecessary re-renders • Extra complexity • Harder-to-maintain components Here’s a simple way to think about it: 👉 If it affects the UI → use state 👉 If it doesn’t → use useRef useRef lets you store values across renders without triggering a re-render. This makes it perfect for things like: • Storing timers • Tracking previous values • Accessing DOM elements • Keeping mutable values Using state where a ref is enough is a common mistake. And over time, it impacts performance and code clarity. 👇 Simple comparison below Day 20/100 — sharing practical frontend engineering lessons. Do you usually default to state or think before choosing? #ReactJS #FrontendEngineering #JavaScript #WebDevelopment #SoftwareEngineering
To view or add a comment, sign in
-
-
Different logos. Same architecture. 😅 ⚛️ Next.js 💿 Remix 🟢 Nuxt 🔥 SvelteKit 💎 SolidStart 🚀 Astro They all now ship with: 📂 File-based routing ⚡ SSR + loaders before paint 🔄 Server mutations without a separate API layer 🌍 Adapters for Vercel, Cloudflare, or Node 5 years ago, you picked a framework for its philosophy. Today, the philosophies have merged. 🤝 Next.js App Router, Remix mutations, SvelteKit load functions… Everyone quietly arrived at the same answers: 🏆 Convention > configuration Open any modern src/routes folder and it’s basically the same map with different stickers. 🗺️ The real question is no longer: “Which framework should I learn?” It’s: “What problems do conventions still leave unsolved?” 🤔 That’s probably where the next 5 years of frontend innovation will happen. 👇 What’s one thing you still wish frameworks left to the developer’s freedom? #WebDevelopment #Frontend #NextJS #JavaScript #SvelteKit #RemixRun #NuxtJS #SoftwareEngineering #DevCommunity #FullStack #TechTrends #ProgrammerHumor #OpenSource #ReactJS #ServerSideRendering
To view or add a comment, sign in
-
-
🧠 I thought I understood the Intersection Observer API… until I looked under the hood. Like most frontend developers, I’ve used it for things like: • Lazy loading images • Infinite scrolling • Triggering animations when elements enter the viewport But today I spent some time digging deeper into how it actually works inside the browser, and it’s surprisingly elegant. Traditionally, many scroll-based implementations rely on listening to scroll events and repeatedly calculating element positions relative to the viewport. The issue is that this can run very frequently during scrolling, which may trigger layout calculations and impact performance. Intersection Observer approaches this differently. Instead of us constantly checking element visibility, the browser internally tracks intersections and notifies us only when specific thresholds are crossed. A few things that stood out to me: ⚡ Observers trigger only when visibility thresholds change ⚡ Multiple elements can share a single observer instance ⚡ The browser can batch and optimize intersection calculations internally It’s one of those APIs that feels simple on the surface but becomes really impressive when you look at the design behind it. Frontend engineering never stops surprising me 🌐 💬 What’s a Web API you explored recently that felt simple at first but turned out to be deeply engineered? #frontend #javascript #webperformance #webdevelopment #browser
To view or add a comment, sign in
-
For a long time I tried to stop React from re-rendering. memo, useCallback, anything that could reduce renders. Then I learned something simple: Re-renders cannot be the real problem. React is actually very fast at rendering. The real issue is doing heavy work during render. Example: const sortedUsers = users.sort((a, b) => a.age - b.age) This runs on every render. Better: const sortedUsers = useMemo( () => users.slice().sort((a, b) => a.age - b.age), [users] ) The goal isn’t fewer renders. It’s less work per render. That small shift changed how I think about React performance. When did React finally “click” for you? #reactjs #javascript #frontend #sourcescodedev
To view or add a comment, sign in
-
-
Building loading states shouldn’t feel like copy-paste work. Every React project ends up with the same repetitive loading UI code — divs, shimmer effects, duplicated layouts… again and again. So I built something to fix that. react-auto-skeletonizer An npm package that automatically generates skeleton loaders for your React components. No more manually crafting loading states. Just plug it in and let it handle the boring part. What it does: - Generates skeleton UI based on your components - Saves time and reduces repetitive code - Improves user experience with clean loading states Try it out: https://lnkd.in/gAjmubgD Would love to know what you think — feedback, ideas, or improvements are all welcome 🙌 #React #Frontend #JavaScript #OpenSource #npm #WebDevelopment
To view or add a comment, sign in
-
A small React fun fact that changes how you think about performance: It’s not the DOM update that hurts the most. It’s what the browser does after it. When you change something in the DOM, the browser may: → recalculate layout (where everything sits) → repaint pixels on the screen And that can be more expensive than the JavaScript itself. Which means: You can have perfectly optimized React code… and still ship a slow UI. Example: Changing width, height, top, left → triggers layout Changing transform, opacity → usually avoids it That is why animations using transform feel smoother. React optimizes rendering. But the browser decides the real cost. Understanding this is where frontend becomes engineering, not just coding. #Frontend #React #Performance #WebDevelopment #JavaScript
To view or add a comment, sign in
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development