@zendeskgarden/react-forms
Version:
Components relating to form elements in the Garden Design System
35 lines (27 loc) • 981 B
Markdown
# /react-forms [](https://www.npmjs.com/package/@zendeskgarden/react-forms)
This package includes components relating to native form fields in the
[Garden Design System](https://zendeskgarden.github.io/).
## Installation
```sh
npm install /react-forms
# Peer Dependencies - Also Required
npm install react react-dom styled-components /react-theming
```
## Usage
```jsx
import { ThemeProvider } from '/react-theming';
import { Field, Input } from '/react-forms';
/**
* Place a `ThemeProvider` at the root of your React application
*/
<ThemeProvider>
<form>
<Field>
<Field.Label>Example Text Input</Field.Label>
<Field.Hint>Hint text</Field.Hint>
<Input placeholder="Accepts all native input props" />
<Field.Message>Default message styling</Field.Message>
</Field>
</form>
</ThemeProvider>;
```