Skip to content
Be1zebubPublic

About

Headless overlay primitives for Svelte 5. Tooltips, hovercards, popovers, menus, and dialogs using the native top layer.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SV Layer

Headless overlay primitives for Svelte 5. Attach tooltips, menus and dialogs to your own markup. Surfaces use native browser top-layer positioning, with optional themes.

Documentation and live demos · Installation · Release notes

Quick start

pnpm add @sv-layer/tooltip
<script lang="ts">
	import { tooltip } from "@sv-layer/tooltip";
	import "@sv-layer/tooltip/theme.css";
</script>

<button {@attach tooltip("Save changes")}>Save</button>

The six attachment packages require Svelte 5.29+ and a browser with the native Popover API. The shared engine is installed automatically. It also supports direct use from Svelte 5.0. Theme CSS is optional. Custom styles for a portaled surface should use a global selector or an explicit class.

Packages

Package Use it for
@sv-layer/tooltip Text hints on hover or keyboard focus
@sv-layer/hovercard Interactive hover and focus previews
@sv-layer/popover Click-driven panels, filters and forms
@sv-layer/dropdown Action menus with arrow keys and typeahead
@sv-layer/context-menu Right-click, long-press and nested menus
@sv-layer/modal Focus-trapped dialogs and alerts

See runnable examples and the core package.

Development

Use Node.js 24 and the pnpm version pinned in package.json.

pnpm install --frozen-lockfile
pnpm build
pnpm check
pnpm test:unit
pnpm test:types
pnpm test:delivery

With the Playwright browsers installed, run pnpm test:e2e --project chromium, --project firefox or --project webkit.

MIT

About

Headless overlay primitives for Svelte 5. Tooltips, hovercards, popovers, menus, and dialogs using the native top layer.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages