
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
react-libre-form
Advanced tools
React component for WP Libre Form. Give it the location of your WordPress instance and the form slug (or id) and it handles the rest.
And if that's not good enough for you, it's rather flexible and can be customized.
The upcoming WP Libre Form 2.0 is going to make breaking changes to it's JS "API", and this package is going to go through some changes as well. Expect 1.0.0 of this package to only work with WP Libre Form 2.0.
npm install react-libre-form
There are no dependencies, except the peer dependency of html-react-parser, which is required to render the HTML WordPress outputs. If you're already using a HTML parser w/ WP REST API, I suggest that you migrate to html-react-parser, as react-html-parser is massive.
Import and configure, render like any other component
import LibreForm, { configure } from 'react-libre-form'
configure({
WordPress: 'https://libreformbuilder.local',
i18n: {
loading: 'Custom loading message',
scriptTimeout: 'Timeout while loading wplf-client.js',
}
})
class Demo extends Component {
render() {
return <div>
<h1>react-libre-form Demo</h1>
<LibreForm form="form-slug"
onSubmitSuccess={(...arg) => console.log(arg, 'success1')}
onSubmitDenied={(...arg) => console.log(arg, 'denied1')}
afterLoad={() => console.log("I'll appear after this form has loaded")}
/>
</div>
}
}
If you have <input type="submit" value="Send form" /> in your form HTML, you might notice that the "Send form" is missing in your rendered form. TL;DR explanation on why this happens: React.
<button type="submit">Send form</button> is functionally equivalent and works without an issue.
FAQs
react-libre-form React component
The npm package react-libre-form receives a total of 13 weekly downloads. As such, react-libre-form popularity was classified as not popular.
We found that react-libre-form demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.