npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@awc-ui/svelte

v1.0.1

Published

Svelte 5 components for accessible Material Design 3 Web Components, with SvelteKit SSR and server-rendering guidance

Readme

Svelte Web Components and SvelteKit SSR — @awc-ui/svelte

@awc-ui/svelte supplies types for AWC UI's native custom elements in Svelte 5.57 or later. Property types and custom-event payloads come from the core declarations.

npm install @awc-ui/svelte @awc-ui/core

For a client-rendered Vite application, load the theme and register the components you use through static imports. Import the Svelte package's types once:

// main.ts
import type {} from '@awc-ui/svelte';
import '@awc-ui/core/css/tokens.css';
import '@awc-ui/core/components/md-text-field';
import '@awc-ui/core/components/md-button';

Then use the native properties and custom events directly:

<script lang="ts">
  let name = '';
</script>

<md-text-field
  label="Project name"
  value={name}
  on:mdInput={(event) => name = event.detail}
></md-text-field>
<md-button variant="filled">Create project</md-button>

The mdInput payload is inferred as a string, and invalid component property values are reported by svelte-check. Svelte 5 also supports the event-handler property spelling onmdInput. Use value plus the component's mdInput or mdChange event to synchronize forms; the custom elements do not expose a Svelte bind:value contract.

defineCustomElements remains available from @awc-ui/svelte for applications that deliberately deploy the lazy loader and its runtime chunks. Static component imports work with Vite's module graph and keep registration limited to the components you use.

SvelteKit server-side rendering

Use SvelteKit 2.70.3 or later for the client initialization hook. On the server, transform the completed HTML response with renderToString from @awc-ui/core/hydrate; createPageTransform from @awc-ui/core/ssr/sveltekit buffers response chunks until the document is complete.

On the client, create a shared createSvelteHydration() instance from @awc-ui/core/ssr/sveltekit. Call capture() from hooks.client.ts's init before Svelte hydrates, then call restore() in the root layout's onMount before dynamically importing the SSR-capable component entries. This preserves AWC shadow roots while Svelte claims the surrounding document.

The helper must come from the same AWC UI release as the core components. Follow the complete SvelteKit reference app and shared SSR guide for the server hook and client lifecycle.