r/reactjs 8h ago

Resource What a frontend engineer actually need to know about design systems

Thumbnail
upskills.dev
11 Upvotes

As a frontend engineer, building a design system from scratch is mostly a thing of the past. UI libraries and AI tools get you 80% of the way there instantly.

But for that last 20% when you need to scale, inject your own taste, and hit product-specific requirements, understanding the underlying architecture is what saves you. It also makes your AI workflow way better, because you aren't constantly prompting it to fix token issues or regenerate styles for minor changes.

Here are 4 important rules for keeping design systems scalable and clean:

  1. Decouple values: Components read semantic roles (“--color-accent”), not raw values, so rebrands don't require UI file edits.
  2. Derive scales: Avoid hand-picking hover or dark states. Use “oklch” to derive your entire palette from a few seeds.
  3. Boundaries: UI components (Buttons/Inputs) wrap tokens in typed variant APIs. Feature blocks (Cards/Navbars) compose them to prevent duplication.
  4. CSS over React state: Theme switching becomes a simple root selector swap, avoiding React context re-renders.

I recently published a new technical blog post covering those important points. Alongside it, I built Design System Studio - a visual tool to tune tokens in ⁠oklch⁠ and export them directly to Tailwind or shadcn/ui.

Check it out with the attached link in this post.


r/reactjs 4h ago

Show /r/reactjs I built a react router transition lifecycle that keeps animation logic outside route components

1 Upvotes

i’ve been building Routeveil, an open-source transition layer for react router.

the main problem I wanted to solve was coordinating:

- the current route exit

- navigation

- the incoming route render

- the enter animation

- cleanup and interaction restoration

without putting animation state inside every page component.

the basic structure is:

<RouteveilProvider>

<Header />

<RouteveilView>

<Routes />

</RouteveilView>

<Footer />

</RouteveilProvider>

Navigation then selects an effect:

<RouteveilLink

to="/docs"

transition="slide"

transitionOptions={{ direction: 'left' }}

>

Documentation

</RouteveilLink>

page transitions animate RouteveilView, while overlay transitions render through a body portal and cover the complete viewport

the library currently has 20 built-ins, typed transition specific options, programmatic navigation, reduced motion handling, and a playback hook for previewing effects without navigation

demo:

https://routeveil.dev

source:

https://github.com/milkevich/routeveil

I’m interested in feedback on the lifecycle and public API, also is there anything here that would make you hesitate to use it in an actual react router project?


r/reactjs 17h ago

Is using Next.js (SSR) justified solely to hide complex client-side business logic from AI-powered reverse engineering? (Spring Backend, No SEO needed)

0 Upvotes

I'm designing a web application where the frontend framework choice has sparked a debate, and I want to get your thoughts on this specific security angle.

To give some context:

  • Backend: Spring Boot (all critical validation and business logic will obviously happen here).
  • SEO: Completely unnecessary (it's a private/internal or dashboard-style app).

My team is considering using Next.js (SSR) primarily to hide certain sensitive business logic and domain rules.

Here is my core concern and the dilemma: Even if all critical security checks happen on the Spring server, we have complex UI-side business logic and state orchestration that we do not want users (or competitors) to inspect. With modern AI tools, reverse-engineering, de-obfuscating, and analyzing front-end JavaScript bundles has become frighteningly easy. If we use a pure CSR approach (like React SPA), anyone can easily crack open the bundle and understand our proprietary workflows or validation rules.

By moving this rendering and logic to Next.js server-side, we prevent that code from ever reaching the client bundle.

My questions are:

  1. Is protecting proprietary front-end logic/workflows from AI reverse-engineering a valid or sufficient reason to adopt Next.js (SSR) when SEO doesn't matter and the backend is Spring?
  2. Or is this "security through obscurity," and if the logic is truly sensitive, does it strictly belong in the Spring backend regardless of where the UI is rendered?

Would love to hear how you weigh the overhead of Next.js against the risk of exposed client-side code. Thanks!


r/reactjs 16h ago

Resource I got tired of HTML-to-PDF breaking my invoice layouts, so I built a visual react-pdf builder that exports the code

Thumbnail
pdfxbuilder.com
0 Upvotes

Every time a client app needed PDFs (invoices, receipts, reports) I ended up either fighting Puppeteer/HTML-to-PDF (pagination breaks, tables split across pages, ~100MB Chromium that is rough on Vercel) or hand-writing u/react-pdf and fiddling with spacing for hours.

I built a tool to scratch this: a drag-and-drop canvas of react-pdf components with a live PDF preview, and crucially it exports clean typed TSX you own and drop into your repo (no vendor runtime, data stays in your app). There is an optional hosted render API too but the export is the point.

Sharing it because this community is exactly who hits this problem. Free to build and export. I would love feedback on whether the exported code is actually code you would ship, and on any layout that is awkward to build. Made by me.


r/reactjs 9h ago

Show /r/reactjs I made a markdown+Latex renderer in under 10kb

Thumbnail
llmrender.com
0 Upvotes

Hey r/reactjs,

I built LLMRender: a Markdown renderer for React, under 10KB with zero dependencies, vs 300KB+ for the usual react-markdown + katex + highlighting stack.

Handles GFM (tables, task lists, callouts), LaTeX math as native MathML, syntax highlighting for 30+ languages, and is streaming-safe. Safe by default too: no dangerouslySetInnerHTML, raw HTML off unless you opt in:

import Markdown from "llmrender";
const App = ({ text }) => <Markdown>{text}</Markdown>;

Feedback welcome, especially from anyone building chat/LLM UIs! I built it after using very heavy alternatives in multiple projects and getting tired of it.


r/reactjs 22h ago

Needs Help How do you make this window pop up?

3 Upvotes

https://www.sharyap.com/

In that website portfolio, they have buttons that when you click them, a new "window" appears, anyone know how they were able to do it?


r/reactjs 1h ago

Needs Help How to learn react effectively?

Upvotes

I'm learning web development, and compared to a beginner, I already have solid knowledge of HTML, CSS, and JavaScript (DOM manipulation, api, crud, fetch I've got those down). Now I'm trying to learn React, but somehow it's just not sticking. What practices have worked well for others? I've got the basics of useState, useEffect more or less, but props somehow don't stick with me or even if I read some documentation or example, I can then do the same thing afterward, but as soon as it gets even a little more complex, I start to feel unsure. Thanks for the answers.


r/reactjs 6h ago

Show /r/reactjs I made shadertoy 2.0

Thumbnail
0 Upvotes

r/reactjs 4h ago

Show /r/reactjs Routeveil – page and full-screen overlay transitions for React Router

1 Upvotes

I built Routeveil because route transitions in React Router usually end up scattered across page components or tied to one specific animation setup.

Routeveil keeps the animation logic around the router instead. Each navigation can choose its own effect, while persistent UI like headers and footers stays mounted.

rn it includes:

- 8 page transitions

- 12 full-screen overlay transitions

- typed transition-specific options

- declarative and programmatic navigation

- same-page transition previews

- cursor-aware origins

- reduced-motion support

- custom transition definitions

Example:

import { RouteveilLink } from 'routeveil/react-router'

<RouteveilLink

to="/projects"

transition="tunnel"

transitionOptions={{

origin: 'cursor',

color: '#000000',

}}

>

Projects

</RouteveilLink>

Live demo:

https://routeveil.dev

Source code:

https://github.com/milkevich/routeveil

I’d especially appreciate feedback on the API and whether the transition options feel intuitive.


r/reactjs 9h ago

News Blue Checkmark Coding Agents, Simulated DoorDash Orders, and a Cyberpunk Wizard of Oz

Thumbnail
thereactnativerewind.com
0 Upvotes

Hey Community,

We explore Grok Build, the new terminal-based TUI coding agent from x.ai. We also look at Appless, an experiment from the creators of OpenUI that bypasses chat bubbles to stream live native UI components using openui-lang.

Finally, we dive into Maestro MCP, a new tool context protocol server that lets AI agents automatically build and run YAML test flows from plain English instructions.

If the Rewind made you nod, smile, or think "oh… that's actually cool" — a share or reply genuinely helps ❤️


r/reactjs 9h ago

Resource I made my dream theme editing app. Open sourcing

4 Upvotes

VIDEO IN COMMENTS 👇🏻

TLDR I made something very cool for my self and I am making it free and also want your opinions because I like the idea of having made something that is useful to others

This is a theme editing app but ok what is the goal here? I know there are apps that do this but none of the good ones are 100 percent free. So the first goal was matching all the features for free. Also even in the paid ones using them doesn’t feel as good as it could in my opinion and major quality of life features are missing.

I also wanted this to be very fun to use. I have adhd and I turbo procrastinate micro adjustments so I needed a theme editor app that felt satisfying to use. There also needed to be the feeling of satisfaction after finishing editing a theme.

Final goal was to make other fun features other apps just don’t do but I really wished they did. As little friction as possible to get a normal theme that doesn’t look like slop then spending a little bit of time micro adjusting the details.

What I actually built up to this point:

I had a very smart idea of yanking the most popular vscode themes and turning them into app themes along with faithful recreations of popular website themes + my custom apple inspired themes. Important! Something the other apps don’t do and I had to do my self manually and wasting tons of time was generating complementary and contrasting colors. I mean I don’t want the app to either be black and white or everything is green and I also don’t want to spend 2 hours selecting random colors.

Other smart idea but work in progress is something that mounts it self inside your app like expo go dev menu and lets you edit the theme that way (didn’t implement yet I want feedback if this is a waste of time or actually sounds cool). I have made the components to pull this off for other things so I may do it anyways because I think this looks cool.

Made the tinder style swipe cards a beautiful theme overview typography themes a metric ton of beautifully crafted previews (everything the web apps do)

My main goal was to get this working on my phone for me because I love micro adjusting these things all the time. I managed to make an interface for making and editing themes as good as all the web apps but with a tiny screen instead. I added nice transitions to make adjusting css variables as fun as possible (hard task 😭)

Ok also there’s a bunch of features I was missing from the already existing ones. I wanted to be able to pick a primary color and have complementary colors etc auto generated and I wanted modes for this. Should the bg be completely white as well as cards? Gray bg white cards? Everything tinted? Page tinted blue primary colors yellow or something? I added auto generators to handle these things.

Another thing I was missing was being able to create one theme and have it auto convert to everything else. I mean I wanna be able to create a shadcn theme and have it able to be exported as a hero ui theme a material ui theme all of them. I made an adapter that handles this automatically.

I wanted this to feel cute and I want to be able to feel like I have created something and not just played with a gloried text file for 30 minutes. I added a collections tag with folders and a handsaw’s signature for each user and a poster generated from each theme.

This has helped me so much personally I want your feedback on this. Sadly there is nothing you can download yet but you can follow the updates on my twitter it’s on my Reddit bio.

Important if you want to “steal” this idea and put something similar in your app I actually encourage this. I am building a copy paste library with all of these components called PitsiUI. I will also experiment with allowing end users to use this to create custom themes for them selves.

Btw this is also coming to iPad mac and web. Android should work too since it’s cross platform but I don’t want to commit to that yet until I have actual users. It may sound silly but making sure no elements overlap the App Store screenshots etc take time.