@ultraviolet/form
TypeScript icon, indicating that this package has built-in type declarations

2.13.6 • Public • Published

Ultraviolet Form

npm version

Ultraviolet Form is an extension of Ultraviolet UI including everything to build forms using React. It is using React Hook Form under the hood.

Installation

$ pnpm add @ultraviolet/form @emotion/react @emotion/styled

Usage

To use the library you need to put a ThemeProvider from @emotion/react with the theme that comes from @ultraviolet/ui then wrap all your fields inside a Form:

import { ThemeProvider } from '@emotion/react'
import { Form, TextInputField } from '@ultraviolet/form'
import { theme } from '@ultraviolet/ui'
import { useForm } from '@ultraviolet/form'

export default function App() {
  const methods = useForm()
  return (
    <ThemeProvider theme={theme}>
      <Form methods={methods}>
        <TextInputField name="example" />
      </Form>
    </ThemeProvider>
  )
}

Documentation

Checkout our documentation website.

Readme

Keywords

Package Sidebar

Install

npm i @ultraviolet/form

Weekly Downloads

1,494

Version

2.13.6

License

Apache-2.0

Unpacked Size

143 kB

Total Files

107

Last publish

Collaborators

  • phiphi
  • mprost
  • scaleway-bot