r/reactjs • u/nphivu414 • Jul 22 '26
Resource What a frontend engineer actually need to know about design systems
https://upskills.dev/tutorials/react-design-systemsAs 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:
- Decouple values: Components read semantic roles (“--color-accent”), not raw values, so rebrands don't require UI file edits.
- Derive scales: Avoid hand-picking hover or dark states. Use “oklch” to derive your entire palette from a few seeds.
- Boundaries: UI components (Buttons/Inputs) wrap tokens in typed variant APIs. Feature blocks (Cards/Navbars) compose them to prevent duplication.
- 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.
24
u/Savalava Jul 22 '26
Your 4 rules are very difficult to parse.
I would suggest concentrating on trying to make your technical writing easier to understand.
EDIT
I had a quick read of this page
https://upskills.dev/tutorials/react-design-systems
and same problem. Unclear writing.
12
u/StarboardChaos Jul 22 '26
What does it mean: buttons wrap tokens in typed variant APIs?
5
u/Embostan Jul 22 '26 edited Jul 22 '26
Custom design systems in Tailwind?? Oof...
We tried tw-variants and it was not nice at all. I'd say anyone doing a truly custom design system should stick to CSS Modules, else they will be fighting TW hard. Plus you can't Stylelint and auto-fix TW.
Maybe the latest version improved stuff, but I have PTSD. I don't wanna say never again but... never again.
3
u/BoBoBearDev Jul 23 '26
First step is to understand, the layout system in MUI is not good, make your own. Also stop using Flex gymnastics on EVERYTHING when CSS Grid is much better and old. And stop using Media Query because it hardcoded responsiveness to a fixed layout, use Container Query instead.
2nd step, make sure to understand memo and useMemo are two different things.
-1
u/Brilla-Bose Jul 23 '26
As an FE, what you need to know is that AI has replaced you, not in reality, but at least in the minds of upper management. Not even full-stack is enough for them now. You're also expected to do DevOps + be able to build AI agents!
-9
u/mi1ord Jul 22 '26
“frontend engineer” lol
-19
u/christfrost Jul 22 '26
This is what you needed to know in 2014. Or when you build a portfolio that is going to be changed once every 3 years. What is this? CS first semester exam?
0
u/[deleted] Jul 22 '26
[deleted] — view deleted comment
1
u/[deleted] Jul 23 '26 edited Jul 23 '26
[removed] — view removed comment