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

mantine-form-devtools

v1.0.2

Published

A devtools for Mantine Form

Readme

Mantine Form DevTools

A powerful development tool for debugging and monitoring Mantine Form state in real-time. This package provides a floating devtools panel that displays form values, errors, validation status, and field states with an intuitive interface.

Acknowledgments

Special thanks to Mantine UI for providing an excellent React components library that makes building beautiful and accessible web applications a breeze. This devtools package is built on top of Mantine's powerful form library and UI components.


Built with ❤️ using Mantine


Features

  • 🔍 Real-time form state monitoring - View form values, errors, and validation status
  • 🎨 Customizable positioning - Position the devtools panel in any corner of the screen
  • 🌓 Theme support - Light and dark theme options
  • 🔍 Field filtering - Search and filter fields by name
  • 📊 Visual indicators - Color-coded badges for form validity, dirty state, and touched state
  • 🎯 Nested object support - Handle complex form structures with nested objects
  • Performance optimized - Minimal re-renders and efficient state updates

Installation

Choose your preferred package manager:

# Using npm
npm install mantine-form-devtools

# Using yarn
yarn add mantine-form-devtools

# Using pnpm
pnpm add mantine-form-devtools

# Using bun
bun add mantine-form-devtools

Usage

Using the Component

Import and use the FormDevTools component directly:

import { useForm } from '@mantine/form';
import { FormDevTools } from 'mantine-form-devtools';

function MyForm() {
  const form = useForm({
    initialValues: {
      email: '',
      password: '',
      profile: {
        firstName: '',
        lastName: '',
      },
    },
    validate: {
      email: (value) => (/^\S+@\S+$/.test(value) ? null : 'Invalid email'),
      password: (value) => (value.length < 6 ? 'Password too short' : null),
    },
  });

  return (
    <form onSubmit={form.onSubmit(console.log)}>
      {/* Your form fields here */}

      {/* Add the devtools component */}
      <FormDevTools
        form={form}
        position="top-right"
        theme="dark"
      />
    </form>
  );
}

Using the Hook

For a more convenient integration, use the useFormDevTools hook:

import { useForm } from '@mantine/form';
import { useFormDevTools } from 'mantine-form-devtools';

function MyForm() {
  const form = useForm({
    initialValues: {
      username: '',
      email: '',
      settings: {
        notifications: true,
        theme: 'dark',
      },
    },
  });

  const { DevTools } = useFormDevTools(form);

  return (
    <form onSubmit={form.onSubmit(console.log)}>
      {/* Your form fields here */}

      {/* Add the devtools using the hook */}
      <DevTools
        position="bottom-left"
        theme="light"
      />
    </form>
  );
}

Props

FormDevTools Props

| Prop | Type | Default | Description | | ---------- | -------------------------------------------------------------- | ------------- | ------------------------------ | | form | UseFormReturnType<any> | Required | The Mantine form instance | | position | 'top-right' \| 'top-left' \| 'bottom-right' \| 'bottom-left' | 'top-right' | Position of the devtools panel | | theme | 'dark' \| 'light' | 'dark' | Theme for the devtools panel |

Examples

Basic Form with DevTools

import { TextInput, Button, Stack } from '@mantine/core';
import { useForm } from '@mantine/form';
import { FormDevTools } from 'mantine-form-devtools';

function LoginForm() {
  const form = useForm({
    initialValues: {
      email: '',
      password: '',
    },
    validate: {
      email: (value) => (/^\S+@\S+$/.test(value) ? null : 'Invalid email'),
      password: (value) => (value.length < 6 ? 'Password too short' : null),
    },
  });

  return (
    <form onSubmit={form.onSubmit(console.log)}>
      <Stack>
        <TextInput
          label="Email"
          placeholder="[email protected]"
          {...form.getInputProps('email')}
        />
        <TextInput
          label="Password"
          type="password"
          {...form.getInputProps('password')}
        />
        <Button type="submit">Login</Button>
      </Stack>

      <FormDevTools form={form} />
    </form>
  );
}

Complex Form with Nested Objects

import { TextInput, Checkbox, Select, Button, Stack } from '@mantine/core';
import { useForm } from '@mantine/form';
import { useFormDevTools } from 'mantine-form-devtools';

function UserProfileForm() {
  const form = useForm({
    initialValues: {
      personalInfo: {
        firstName: '',
        lastName: '',
        email: '',
      },
      preferences: {
        theme: 'light',
        notifications: true,
        language: 'en',
      },
      address: {
        street: '',
        city: '',
        country: '',
      },
    },
  });

  const { DevTools } = useFormDevTools(form);

  return (
    <form onSubmit={form.onSubmit(console.log)}>
      <Stack>
        {/* Personal Info */}
        <TextInput
          label="First Name"
          {...form.getInputProps('personalInfo.firstName')}
        />
        <TextInput
          label="Last Name"
          {...form.getInputProps('personalInfo.lastName')}
        />
        <TextInput
          label="Email"
          {...form.getInputProps('personalInfo.email')}
        />

        {/* Preferences */}
        <Select
          label="Theme"
          data={['light', 'dark']}
          {...form.getInputProps('preferences.theme')}
        />
        <Checkbox
          label="Enable Notifications"
          {...form.getInputProps('preferences.notifications', { type: 'checkbox' })}
        />

        {/* Address */}
        <TextInput
          label="Street"
          {...form.getInputProps('address.street')}
        />
        <TextInput
          label="City"
          {...form.getInputProps('address.city')}
        />

        <Button type="submit">Save Profile</Button>
      </Stack>

      <DevTools position="bottom-right" theme="light" />
    </form>
  );
}

Requirements

This package requires the following peer dependencies:

  • @mantine/core ^8.2.7
  • @mantine/form ^8.2.7
  • @tabler/icons-react ^3.34.1
  • react ^19.1.1
  • react-dom ^19.1.1
  • typescript ^5.9.2

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

Acknowledgments

Special thanks to Mantine UI for providing an excellent React components library that makes building beautiful and accessible web applications a breeze. This devtools package is built on top of Mantine's powerful form library and UI components.


Built with ❤️ using Mantine