https://nuejs.org/blog/standards-first-react-alternative/
Home Docs Blog Vision Hyper Standards first React alternative > Slack
8.5k [dots] Back May 8, 2025
Introducing Hyper -- Standards first React alternative (Developer
Preview)
[tero] Tero Piirainen @tipiirai
Hyper is a standards first markup language for building user
interfaces. It enables developers (and AI models) to generate complex
UIs with amazingly clean syntax.
[hyper-banner-dark-big]
Project goals
1. Standards first: User interfaces should be assembled with HTML,
styled with CSS, and enhanced with JavaScript.
2. Simplicity: UI composition should be easy and require as few
idioms and abstractions as possible, both on client and server
(SSR).
3. Design Systems: Design should be a separate subsystem, easily
accessible for developers who care about and understand design.
4. Scalability: Complex UIs should retain simplicity as the
application grows.
To understand how these goals are met, we use React as a
counter-example because it's the opposite of Hyper's
architecture and design goals. React embraces a monolithic
architecture where logic, structure, and styling are mixed together,
while Hyper is what React 1.0 (2013) originally envisioned: just a
headless view layer.
Let's study the difference in more detail:
Compare: React vs Hyper
* Simple components
* Complex components
* Design systems
* Scalability
Simple components
Below is a basic
component defined in three ways:
Modern ReactModern React Old school ReactOld school React HyperHyper
1. Modern React Modern React represents a common approach to
building user interfaces today using component libraries such as
ShadCN/UI, Material UI, Chakra, or Tailwind Catalyst. In this
example, we chose ShadCN as it's gained significant
popularity in recent years and has strong AI tool support. For
example, Claude and ChatGPT offer built-in support for ShadCN in
their code previews. Source * Demo
2. Old school React is how React components were built back in the
days when styling was decoupled from the component code. Source *
Demo
3. Hyper demonstrates the standards-first approach. Source * Demo
While these differences might seem minor, they become apparent when
we move to more complex components:
Complex components
Next we examine how these approaches handle increasing complexity.
Here's the same table component, but now with sorting and
filtering:
Modern ReactModern React Vanilla TSXVanilla TSX HyperHyper
1. Modern React is assembled according to ShadCN's data table
documentation. The bundled JavaScript is 91.3KB. Source * Demo
2. Vanilla TSX uses useState and useMemo to implement the added
functionality, and the HTML is tagged the old school way with
numerous class names.
3. Hyper uses semantic HTML with minimal class names and two
instance methods for sorting and filtering. The resulting JS is
only 3.9KB minzipped (1.2KB + 2.7KB for hyper.js). Source * Demo
Design systems
Here's an example dashboard assembled with Hyper:
[minimalist]
Source * Demo
Here is the same dashboard, but with `Ramsian' look and feel:
[ramsian-bi]
This transformation required zero changes to component code. Just a
32-line CSS file extending the base design system. Demo
Modern React: tightly coupled design
This kind of design swap becomes a large programming effort when
design choices are coupled into components via CSS-in-JS or Tailwind.
For example, in ShadCN, to change the typography of your headings,
you need to edit alert-dialog.tsx, alert.tsx, card.tsx, dialog.tsx,
drawer.tsx, and sheet.tsx. This requires understanding of idioms like
data-slot, {...props}, cn(), clsx(), and twMerge(). Here's the
code for the title and description elements:
[shadcn-typ]
Tight coupling can also create a maintenance issue. For example,
ShadCN's `New York' theme duplicates their default theme,
resulting in 40,000+ lines of additional TSX code to maintain.
While you definitely can decouple your styling from your React
components, this pattern is rarely seen in real-world applications.
Instead, the use of vanilla CSS is often discouraged due to concerns
about `global namespace pollution' or other reasons.
Hyper: decoupled design system
By contrast, Hyper colocates your typography concerns into a single
CSS file, acting as the single source of truth for your h2 an p
element styling:
[copy]
^// typography.css
@layer globals {
h2 {
font-size: 1.125em;
font-weight: 500;
}
p {
color: var(--base-500);
text-wrap: balance;
line-height: 1.5;
}
^// all typography rules "colocated" here
}
This solves three key issues in modern React:
1. Truly reusable components across projects and styling contexts
2. Central design system easily maintainable from the same place
3. Zero boilerplate due to strict separation of concerns
Nue actually enforces you to external design system. Tight coupling
in any form: CSS-in-JS, class name abuse, component-specific