Skip to content
Svelte Helpers
Language:en Author:AtomForge

Overview

Purpose

Svelte 5 components repeat the same few patterns: accepting a class, spreading extra attributes, declaring children snippets, and offering boolean variant props such as small or primary. This package names those patterns once so components stay consistent and type-safe.

It is not a component framework. There is no styling, theming, or state management, and the only component is RenderSnippet.

Installation

bun add @atom-forge/svelte-helpers

Svelte ^5.0.0 is a peer dependency.

What is exported

Group Exports Kind
Prop types ClassProp, AnyProp, ChildrenProp, ChildrenPropOptional types only
Type utilities XOR, AtLeastOne types only
Helpers variantMap, debounce, debounceAsync, as runtime
Component RenderSnippet runtime

Import runtime values normally and types with import type:

import { debounce, variantMap } from "@atom-forge/svelte-helpers";
import type { ClassProp, XOR } from "@atom-forge/svelte-helpers";

Teaches (1)

  • package-scope