Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
next-hubspot
Advanced tools
Embed HubSpot forms into your Next.js application using hooks.
🌳 Tiny and Tree-Shakable
🦄 Written in TypeScript
👾 Works with multiple forms
😎 Uses next/script
component
yarn add next-hubspot
or
npm install --save next-hubspot
This package is now pure ESM. It cannot be require()
'd from CommonJS.
Wrap your application with HubspotProvider
. This will add Hubspot script to your document.
All props are passed directly to the Script tag, so you can use all props from the next/script documentation.
import { HubspotProvider } from 'next-hubspot';
const MyApp = ({ Component, pageProps }) => (
<HubspotProvider>
<Component {...pageProps} />
</HubspotProvider>
)
import { useHubspotForm } from 'next-hubspot';
const HubspotForm = () => {
const { loaded, error, formCreated } = useHubspotForm({
portalId: 'XXXXXXX',
formId: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
target: '#hubspot-form-wrapper'
});
return (
<div id="hubspot-form-wrapper" />
)
}
All props are based on the HubSpot docs.
The module is written in TypeScript and type definitions are included.
Contributions, issues and feature requests are welcome!
Give a ⭐️ if you like this project!
FAQs
Hubspot forms in Next.js with no headache
We found that next-hubspot 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.