Formstrap
Let your reactstrap input component integrate seamlessly using formik
Install / Use
/learn @naupaw/FormstrapREADME
Formstrap
Let your reactstrap input component integrate seamlessly using formik
Installation
npm install bootstrap reactstrap formik formstrap
Or
yarn add bootstrap reactstrap formik formstrap
make sure both Formik, reactstrap and bootstrap installed
Basic usage
Just replace any Input / CustomInput from reactstrap to formstrap and you're done!
import Ract from 'react';
import { Formik, Form } from 'formik';
import { Input, Submit } from 'formstrap';
import { FormGroup } from 'reactstrap';
import 'bootstrap/dist/css/bootstrap.css';
const App = () => {
const initialValues = {
fname: 'laws',
};
const onSubmit = async (values, { setSubmitting }) => {
console.log(values);
// some await function ...
setSubmitting(false);
};
return (
<Formik initialValues={initialValues} onSubmit={onSubmit}>
<Form>
<FormGroup>
<Label>Name</Label>
<Input type="text" name="fname" />
</FormGroup>
<Submit withSpinner>Save</Submit>
</Form>
</Formik>
);
};
Additional Props
All props is extends from default Reactstrap Input props here's the thing that we added.
<Input /> and <CustomInput />
- withLoading?: boolean - Input is disabled when submit / isSubmitting occur
- withFeedback?: boolean - Throw feedback when validation has error
<Submit />
- withLoading?: boolean - Button is disabled when submit / isSubmitting occur
- withSpinner?: boolean - Show spinner icon when submit / isSubmitting occur
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
