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

formulatte

v0.0.1

Published

![Formulatte Banner](design/banner.png)

Readme

Formulatte ☕

Formulatte Banner

A modern, type-safe form management library for Svelte 5+.

npm version License: MIT

Features

  • 🎯 Built specifically for Svelte 5's runes
  • 💪 Full TypeScript support
  • 🔄 Built-in Yup validation
  • ⚡ Lightweight and performant
  • 🎨 Zero styling opinions
  • 📦 Simple API
  • 🔍 Detailed validation states
  • 🛠️ Flexible field handling

Installation

npm install formulatte
# or
pnpm add formulatte
# or
bun add formulatte

Quick Start

<script lang="ts">
  import { Form } from 'formulatte';
  import * as yup from 'yup';

  const schema = yup.object({
    email: yup.string().email().required(),
    password: yup.string().min(6).required()
  });

  const initialValues = {
    email: '',
    password: ''
  };

  async function handleSubmit(values) {
    console.log('Form submitted:', values);
  }
</script>

<Form {initialValues} validationSchema={schema} onSubmit={handleSubmit}>
  {#snippet default(form)}
    <div>
      <input 
        bind:value={form.state.values.email}
        onblur={() => form.validate('email')}
      />
      {#if form.state.errors.email}
        <span class="error">{form.state.errors.email}</span>
      {/if}
    </div>

    <button type="submit" disabled={!form.state.isValid}>
      Submit
    </button>
  {/snippet}
</Form>

API Reference

Form Component

The main component that manages form state and validation.

interface FormProps<T> {
  initialValues: T;
  validationSchema?: Schema;
  onSubmit: (values: T) => Promise<void> | void;
  validateOnBlur?: boolean;
  validateOnChange?: boolean;
}

Form State

Available through the form snippet parameter:

interface FormState<T> {
  values: T;
  errors: Partial<Record<keyof T, string>>;
  touched: Partial<Record<keyof T, boolean>>;
  isSubmitting: boolean;
  isValid: boolean;
  isDirty: boolean;
}

Form Methods

  • validate(field?: string): Validate entire form or specific field
  • submit(): Submit the form
  • reset(): Reset form to initial values
  • setFieldValue(field, value): Set field value
  • setFieldTouched(field, touched): Mark field as touched

Examples

With Field Validation

<Form {initialValues} validationSchema={schema}>
  {#snippet default(form)}
    <input
      bind:value={form.state.values.email}
      onblur={() => form.validate('email')}
      class:error={form.state.errors.email && form.state.touched.email}
    />
  {/snippet}
</Form>

With Custom Validation

<Form
  initialValues={initialValues}
  onSubmit={async (values) => {
    const isValid = await customValidation(values);
    if (isValid) {
      // proceed
    }
  }}
>
  {#snippet default(form)}
    <!-- form fields -->
  {/snippet}
</Form>

Contributing

We welcome contributions! Please see our contributing guidelines for details.

  1. Fork it
  2. Create your feature branch (git checkout -b feature/amazing)
  3. Commit your changes (git commit -am 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing)
  5. Create a new Pull Request

Development

# Install dependencies
npm install

# Run development server
npm run dev

# Run tests
npm test

# Build library
npm run package

License

MIT © [Nathanael Bonfim]

See LICENSE for more information.

Acknowledgments

  • Inspired by Formik's API
  • Built with Svelte 5's runes
  • Created using sv

Made with lots of ☕