liveBook · Manning

Web Awesome

As explained in Web Component Development with Modern Libraries and Tooling

A Web Awesome component is a reusable custom web component distributed by the Web Awesome library.

Need a button, dialog, or input without building a custom element from scratch? Web Awesome is a library of reusable web components for common interface needs. Its components use custom element names such as `wa-button`; most are free, while some Pro components require a subscription. section 2.1 section 2.3

A clickable button

Add `<wa-button id="my-button" variant="danger">Click Me</wa-button>` to the page. Load Web Awesome’s stylesheets, import `button.js` in a module script, and attach a `click` listener to display an alert. The markup supplies the button; ordinary JavaScript handles the app-specific action. section 2.2

For a local npm-based project:

  • Install Node.js, initialize a project with `npm init -y`, install Vite with `npm install -D vite`, then install `@awesome.me/webawesome`. A registered Web Awesome project with a personal CDN is another delivery option. section 2.2
  • Serve the component files, link the Web Awesome and theme CSS, and import the JavaScript for each component used. Place its `wa-` element in the HTML; the browser upgrades it when its component code loads. section 2.2 section 2.6

The collection extends familiar interface patterns: `wa-input` adds options such as hints and a clear button; `wa-dialog` controls visible content; progress components show numeric status; and tree components display expandable hierarchies. Themes, CSS customization, and layout classes help adapt the default appearance. section 2.3 section 2.8

Web Awesome components are implemented with Lit, but using them does not require learning Lit. Consider download size if an app combines components built with several libraries. For an existing Shoelace app, migration involves replacing package or CDN references, CSS files, and `sl-` element prefixes with their Web Awesome equivalents; most component names and APIs remain the same. section 2.1

How Web Component Development with Modern Libraries and Tooling covers it

How deep it goes
Walks through npm setup, asset loading, a clickable button, and component selection without requiring Lit implementation knowledge.
Examples
Uses a `wa-button` click alert and a larger project combining inputs, dialogs, progress indicators, and other components.
What it assumes
Assumes Node.js for the npm walkthrough but does not require prior knowledge of Lit.
What you can do after
Apply it via Web Awesome to assemble and style interfaces with imported components and ordinary JavaScript event handlers.
How it connects
Connects custom elements with Lit, npm, Vite, CSS themes, and Shoelace migration.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Component Development with Modern Libraries and Tooling. The section links point to the parts of the book it draws on.