✨(react) react-hook-form Input example
Our form elements needs to be usable with react-hook-form
This commit is contained in:
@@ -100,12 +100,20 @@ using the component in a controlled way.
|
||||
|
||||
## Ref
|
||||
|
||||
You can use the `ref` props to get a reference to the input element. The ref to the native input is nested inside the `input` attribute.
|
||||
You can use the `ref` props to get a reference to the input element.
|
||||
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--with-ref"/>
|
||||
</Canvas>
|
||||
|
||||
## Usage with react-hook-form
|
||||
|
||||
You can use this input with [react-hook-form](https://react-hook-form.com/docs)
|
||||
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--react-hook-form"/>
|
||||
</Canvas>
|
||||
|
||||
## Props
|
||||
|
||||
You can use all the props of the native html `<input>` element props plus the following.
|
||||
|
||||
Reference in New Issue
Block a user