react-jotai-form-components 0.2.1-sha.f99975de13768b23050ac58cf9c6f66aaf562df1
Install from the command line:
Learn more about npm packages
$ npm install @principlestudios/react-jotai-form-components@0.2.1-sha.f99975de13768b23050ac58cf9c6f66aaf562df1
Install via package.json:
"@principlestudios/react-jotai-form-components": "0.2.1-sha.f99975de13768b23050ac58cf9c6f66aaf562df1"
About this version
Provides a few basic form components for use with @principlestudios/react-jotai-forms
by leveraging @principlestudios/jotai-react-signals
.
Four individual imports are provided with this package:
-
@principlestudios/react-jotai-form-components/atom-contents
provides a component that will render an atom passed to the children of the component within a fragment. This could be useful when rendering error messages or other React elements.import AtomContents from '@principlestudios/react-jotai-form-components/atom-contents'; <AtomContents>{atom}</AtomContents>;
-
@principlestudios/react-jotai-form-components/input
provides an input element that allows React to treat the input element as an uncontrolled component, but an atom passed todefaultValue
ordefaultChecked
will update the element without a React rerender. Also mapsclassName
,disabled
, andreadOnly
to allow atoms.import JotaiInput from '@principlestudios/react-jotai-form-components/input'; <JotaiInput defaultValue={atom} />;
-
@principlestudios/react-jotai-form-components/select
provides a select element that allows React to treat the select element as an uncontrolled component, but an atom passed todefaultValue
will update the element without a React rerender. Also mapsclassName
anddisabled
to allow atoms.import JotaiSelect from '@principlestudios/react-jotai-form-components/select'; <JotaiSelect defaultValue={atom} />;
-
@principlestudios/react-jotai-form-components/textarea
provides a textarea element that allows React to treat the textarea element as an uncontrolled component, but an atom passed todefaultValue
will update the element without a React rerender. Also mapsclassName
,disabled
, andreadOnly
to allow atoms.import JotaiTextarea from '@principlestudios/react-jotai-form-components/textarea'; <JotaiTextarea defaultValue={atom} />;
Details
- react-jotai-form-components
- PrincipleStudios
- 9 months ago
- MIT
- 4 dependencies
Assets
- react-jotai-form-components-0.2.1-sha.f99975de13768b23050ac58cf9c6f66aaf562df1.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0
Recent versions
View all- 0.2.1
- 0.2.1-sha.f99975de13768b23050ac58cf9c6f66aaf562df1
- 0.2.0
- 0.2.0-sha.40780eb67c2312ef8be9987f61803d3c10483fa1
- 0.1.1-sha.0682b9fb6218b55464e354738347506be4febaa0
- 0.1.1-sha.c8a1850786590b71a52c6185cb883491ed69dace
- 0.1.1-sha.0b04a611a40860aa26f796e72f7c5adc76ab5927
- 0.1.1-sha.0f365b2bef376fb4593950950870cf64cef8b144
- 0.1.1-sha.83c215ac6090a96fa5ed4522f47cda1a72b0b61e
- 0.1.1-sha.b9a7ac5f2a8c22c6451f3e3d44556f4e13fdf740