
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@berlitz/form
Advanced tools
Creates a form from a provided schema.
yarn add @berlitz/form
| Argument | Type | Required | Default | Notes |
|---|---|---|---|---|
| action | string | ✅ | Added to the action attribute on the <form> element. Useful for making forms work when Javascript is disabled. | |
| fields | array | ✅ | Schema for generating the form fields. Refer to the proptypes for the required shape. | |
| onSubmit | function | ✅ | Callback used to handle form submission. onSubmit(values, setSubmitting, setStatus, resetForm) | |
| enableReinitialize | boolean | ❌ | true | Sets the Formik enableReinitialize prop. More info https://tinyurl.com/rzwvmhr |
| method | string | ❌ | 'post' | Sets the method attribute on the <form> element. |
| hiddenFields | array | ❌ | Schema for generating hidden form fields. | |
| light | boolean | ❌ | false | Sets the background to a solid colour and changes all labels and text in the form to be light. |
| loadingLabel | string | ❌ | 'Loading' | Text for the submit button when it is loading. |
| onChange | function | ❌ | Callback used to handle form changes. onChange(values) | |
| submitLabel | string | ❌ | 'Submit' | Text for the submit button. |
| termsLabel | string | ❌ | Text for a Terms and Conditions checkbox. The checkbox will not show if no text is provided. | |
| submitButtonRef | object | ❌ | A ref that is passed to the <SubmitButton /> on this form. Useful for triggering submit events outside of this component. | |
| hideSubmitButton | boolean | ❌ | Useful in combination with submitButtonRef for showing a custom submit button outside of this component. |
import Form from '@berlitz/form'
<Form
action="/"
onSubmit={(values, setSubmitting) => {
alert(values)
setTimeout(() => {
setSubmitting(false)
}, 2000)
}}
submitLabel="Find out more"
fields={fields}
hiddenFields={hiddenFields}
termsLabel="I accept the terms"
onChange={values => {
setValues(values)
}}
light
/>
FAQs
Form component for the Max Design System
The npm package @berlitz/form receives a total of 1,010 weekly downloads. As such, @berlitz/form popularity was classified as popular.
We found that @berlitz/form demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.