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

@formzk/tamagui

v1.0.0

Published

A powerful form management library integrating Tamagui components with @formzk/core, providing seamless cross-platform (web & React Native) form creation and management.

Downloads

119

Readme

@formzk/tamagui

@formzk/tamagui bridges the gap between headless form management and the Tamagui UI kit. While @formzk/core provides the foundation for flexible form logic, @formzk/tamagui offers a set of ready-to-use, pre-configured Tamagui components that work seamlessly with the core architecture — on the web and in React Native, from a single codebase.

Full documentation: https://louiskhenghao.github.io/formzk/


Table of contents


Compatibility

| Peer | Supported range | | ----------------- | ------------------------ | | React | >= 18 (React 18 & 19) | | react-hook-form | >= 7.40 | | @formzk/core | >= 1.0 | | tamagui | >= 1.100 < 3 (v1 & v2) | | Node.js (tooling) | >= 18 |

Works with React 18 and 19, and with Tamagui v1 and v2. Note that Tamagui 2.x itself requires React 19, while the 1.x line also runs on React 18. All components are cross-platform — the same code renders on web (react-native-web) and native React Native.


Installation

yarn add @formzk/core @formzk/tamagui react-hook-form tamagui
# or
npm install @formzk/core @formzk/tamagui react-hook-form tamagui

# install yup validation (optional)
yarn add yup @hookform/resolvers
# or
npm install yup @hookform/resolvers

Your app must be wrapped in a configured TamaguiProvider — see the Tamagui installation guide.


Getting Started

To begin using @formzk/tamagui, ensure that you have @formzk/core set up in your project. If you need guidance on the initial setup, please refer to the @formzk/core documentation.

Register your input components once with the provider, then reference them by name everywhere:

import { Formzk, Checkbox, Select, Switch } from '@formzk/tamagui';
import { Input, TextArea } from 'tamagui';

<Formzk.Tamagui.Provider
  config={[
    { name: 'Input', component: Input },
    { name: 'TextArea', component: TextArea },
    { name: 'Checkbox', component: Checkbox },
    { name: 'Select', component: Select },
    { name: 'Switch', component: Switch },
  ]}
>
  <App />
</Formzk.Tamagui.Provider>;

Accessing Components

Native Components

With the @formzk/tamagui package, you can still access the native components provided by @formzk/core without importing the core package separately. Just use the Formzk.Native namespace to access them:

| Namespace | Reference | | ---------------------- | ------------------------------------------------------------------------------------------------ | | Formzk.Native.Provider | Checkout | | Formzk.Native.Form | Checkout | | Formzk.Native.Input | Checkout | | Formzk.Native.Submit | Checkout | | Formzk.Native.Reset | Checkout | | Formzk.Native.Errors | Checkout |

Tamagui Components

| Namespace | Description | | ----------------------- | ----------------------------------------------------------- | | Formzk.Tamagui.Provider | Same as Formzk.Native.Provider | | Formzk.Tamagui.Form | Config-driven form rendered on Tamagui's Form element | | Formzk.Tamagui.Item | Form input with label / caption / error layouts | | Formzk.Tamagui.Submit | Submit Button wired to the form context | | Formzk.Tamagui.Reset | Reset Button wired to the form context | | Formzk.Tamagui.Errors | Themed error summary (red card) fed from validation state |


Using Formzk.Tamagui.Form

Build an entire form from a config — each top-level array is a row, each entry a column:

import { Formzk } from '@formzk/tamagui';
import { yupResolver } from '@hookform/resolvers/yup';
import * as yup from 'yup';

type Payload = { name: string; email: string; subscribe: boolean };

<Formzk.Tamagui.Form<Payload>
  options={{
    resolver: yupResolver(
      yup.object().shape({
        name: yup.string().required(),
        email: yup.string().email().required(),
      })
    ),
    defaultValues: { name: '', email: '', subscribe: false },
  }}
  config={[
    [
      { name: 'name', component: 'Input', label: 'Name' },
      { name: 'email', component: 'Input', label: 'Email' },
    ],
    [{ name: 'subscribe', component: 'Switch', label: 'Subscribe', layout: 'none' }],
    [{ content: <Formzk.Tamagui.Errors /> }],
    [
      { content: <Formzk.Tamagui.Reset />, layoutProps: { span: 1 } },
      { content: <Formzk.Tamagui.Submit />, layoutProps: { span: 2 } },
    ],
  ]}
  onSubmit={(values) => console.log(values)}
/>;

layoutProps.span is a flex weight: two items with span 2 and 1 split the row 2:1. To stack a row vertically on small screens, pass responsive props on the row, e.g. configLayoutProps={{ containerProps: { flexDirection: 'column', $gtSm: { flexDirection: 'row' } } }}.


Custom Layout

Every input can also be placed manually with Formzk.Tamagui.Item:

<Formzk.Tamagui.Form options={{ defaultValues: { name: '' } }} onSubmit={console.log}>
  <Formzk.Tamagui.Item
    name="name"
    component="Input"
    label="Name"
    caption="Your public display name"
    layout="wrapped"
  />
  <Formzk.Tamagui.Submit text="Save" />
</Formzk.Tamagui.Form>

layout options: none, normal (inject label/error into the component), contained (wrapped in YStack + helper text) and wrapped (label above, helper text below — the default).


Available Components

Input Components

Controlled Tamagui inputs that follow the value/onChange contract of the formzk component registry:

On native platforms Tamagui's Select needs an Adapt/Sheet setup to present its content; on web it works out of the box.

Other Components