Web Awesome Documentation

repository·next·Indexed 23 days ago

https://github.com/shoelace-style/webawesome

A collection of customizable, accessible, and framework-agnostic web components built with Lit and esbuild. This documentation covers the library's core components, the doc transformer pipeline for Eleventy, and the agent skill system used to provide AI tools with hand-authored references for component selection and design guidance.

Tokens
154.2K
Snippets
469
Records
802
Agent score
73%

What's inside Web Awesome

  1. New features in Web Awesome

    next

    Web Awesome introduces several new capabilities compared to Shoelace:

    • New Components: Includes <wa-callout>, <wa-comparison>, <wa-popover>, <wa-page>, <wa-scroller>, <wa-zoomable-frame>, <wa-number-input>, <wa-markdown>, and <wa-intersection-observer>.
    • Native HTML Styling: Use dist/styles/native.css to theme plain HTML elements (like <button>, <input>, <table>) using Web Awesome design tokens.
    • Utility CSS Layer: Provides layout and spacing primitives via plain CSS classes like wa-stack, wa-cluster, and wa-grid (no JS required).
    • Theming: Includes wa-theme-default, -awesome, and -shoelace (the latter approximates the Shoelace look for easier migration).
    • Brand Hue Swapping: Apply a brand color class to the <html> element (e.g., class="wa-brand-purple") to re-skin the entire application.
    • OKLCH Color Palettes: Uses OKLCH for perceptually uniform color tints.
    • SSR-Friendly Hydration: Components use did-ssr and with-* slot markers to support clean server-side rendering hydration.
  2. Web Awesome Pro features and components

    next

    Web Awesome Pro is a paid superset package (@awesome.me/webawesome-pro) that includes advanced components and tools:

    Pro Components:

    • <wa-toast> and <wa-toast-item> (notification stacks)
    • <wa-combobox> (autocomplete/multiselect)
    • <wa-file-input> (drag-and-drop with previews)
    • <wa-chart> and seven typed subclasses (built on Chart.js)
    • <wa-sparkline> (inline trend visualization)

    Pro Extras:

    • 8 additional themes (active, brutalist, glossy, matter, mellow, playful, premium, tailspin)
    • Pro Theme Builder, Pro Color Tools, Pattern Library, and Figma Design Kit.
  3. Web Awesome Browser Support Policy

    next

    Web Awesome officially supports the latest two major versions of the following popular browsers:

    • Chrome
    • Safari
    • Edge
    • Firefox
    • Opera

    For the best experience, it is strongly recommended to use these supported versions. While fixes or workarounds for older browsers may be provided for critical issues at the project's discretion, the primary focus is on modern browser versions.

  4. Use the `<wa-popup>` component for positioning

    next

    The <wa-popup> component is a low-level positioning utility powered by Floating UI. It is designed to position floating elements (like tooltips or dropdowns) relative to an anchor element.

    Important Considerations:

    • Not an accessible component: It does not handle accessibility (ARIA, keyboard navigation, etc.) on its own. It is intended to be used as a building block inside more complex, accessible components (like a <wa-tooltip> or <wa-dropdown>).
    • Anchor Slot: Use the slot="anchor" on an element inside the <wa-popup> to define the target element for positioning. If the anchor is a <slot>, the popup uses the first assigned element as the anchor.
    • Styling Warning: Do not style the popup's anchor with display: contents, as this prevents the component from calculating the correct coordinates.
  5. Use the wa-slider component

    next

    The wa-slider component provides a range input (scrubber) for selecting values. It supports single-thumb selection and dual-thumb range selection. It is compatible with standard <form> elements for submission and validation.

    <wa-slider
      label="Number of users"
      hint="Limit six per team"
      name="value"
      value="3"
      min="0"
      max="6"
      with-markers
      with-tooltip
    >
      <span slot="reference">Less</span
      <span slot="reference">More</span
    </wa-slider>