Nue 1.0 (Beta) — A web framework for UX developers

Exactly one year ago I decided to create a super simple website generator targeted for the following people:

  1. UX developers: who natively jump between Figma and CSS without a confusing designer-developer handoff process in the way.

  2. Beginner web developers: who want to skip the redundant frontend layers and start building websites quickly with HTML, CSS, and JavaScript.

  3. Experienced JS developers: frustrated with the absurd amount of layers in the React stack and looking for simpler ways to develop professional websites.

“Nue is exactly what I want. As a technical founder, I need easier ways to build websites. I don't want to hire devs and watch all my profits disappear in salaries.”

— Alan Hemmings / BigNameHunter / CEO

  1. Designers: planning to learn web development, but find the JavaScript ecosystem too scary

  2. Parents & Teachers: who wants to educate people how the web works


What's new?

v1.0 Beta is by far the biggest release yet with five months of work and over 500 files changed. This is a breakdown of new features, updates, and breaking changes.

Improved CSS stack

Nue has a powerful CSS theming system that supports hot-reloading, CSS inlining, error reporting, and automatic dependency management. This version improves the system with the following features:

CSS view transitions

View transitions are an important part of a seamless user experience and are a key feature in the Nue framework. They can now be enabled with this simple configuration variable:

# enable animated page switches globally
view_transitions: true

This option was previously called router, but this feature is now much more than just a router. It now triggers a view transition effect that you can customize with ::view-transition CSS pseudo-element. This website, for example, has a scale down transition effect on the page's article element. It's defined with this compact CSS:

article {
  view-transition-name: article;
}

/* view transition (scales down the old article) */
::view-transition-old(article) {
  transform: scale(.8);
  transition: .4s;
}

Nue's view transition mechanism implements a simple diffing algorithm to check which parts of the page have been added, changed, or removed and updates the page accordingly. This helps you take advantage of the CSS @starting-style at-rule to trigger animations when the page sections are updated. The non-updating elements stay in place. You can see this in action when you click the sidebar elements under the new documentation area.

View transitions is a broad standard with tons of visual possibilities that are yet unexplored. Nue helps you stay in the forefront CSS development.

CSS best practices

Nue's new CSS best practices brings out the best of modern CSS:

Nue offers the shortest path from Figma to code
Nue offers the shortest path from Figma to code

These lessons focus on writing reusable CSS that is easy to read, maintain, and scale. It unpacks decades of CSS experience with a heavy focus on clarity and minimalism. In fact, all the lessons can squeezed into this one sentence:

10 lines of code are easier to maintain than 100 lines of code

Nue helps you build professional websites with the same amount of CSS as you can find on a typical normalization library or Tailwind's preflight CSS.

New website and documentation

Unsurprisingly, the biggest job was the documentation area, which now focuses on UX development. About 80% of the documentation is completely rewritten and there are several new documents.

The documentation focuses on UX development
The documentation focuses on UX development

The most important thing, however, is that the website is generated with the public Nue version, forcing us to eat our own dogfood.

Easier setup

Nue installation is now simpler and the onboarding now comes with a handy nue create command that installs an example website and opens it on your browser. The opening screen looks like this:

The welcome screen after successful setup
The welcome screen after successful setup

The setup is supported by a tutorial that explains how Nue and UX development works.


Smaller updates

Freeform file naming

There are no longer hard coded app.yaml, layout.html, or main.js file names to give them a special meaning. You can now freely name your CSS, YAML, JavaScript, or HTML files. You can also have multiple data and layout files, and they are all grouped or concatenated together. You could, for example, create a layout.html file for layout-specific components and a components.html file for other server-side components.

Dynamic sections and grid items

You can turn your sections and grid items into a native Web Component. For example, on the front page of this website, we have a scroll-transition component to help implement all the scroll-triggered CSS transitions.

section_component: scroll-transition

The web component can be assigned globally in site.yaml for all page sections or it can be assigned on the area level, or at the page level (in the front matter).

Miscellaneous new features

Breaking changes

The major version number goes from zero to one, which means that this version of Nue is not backward compatible. There are the following changes that might break your HTML or CSS from working:

\``` .blue
<p>the code here is rendered bigger</p>
\```

This will nest the generated <pre> element with a wrapper element like this:

<div class="blue">
  <pre>...</pre>
</div>

Previously the class name would be set directly to the pre element. This makes a more consistent behavior with the [code] tag.

Try now!

Please try it out and experience the difference in UX development. You might wonder why you ever built websites any other way.