
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
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
The npm package next-hubspot receives a total of 3,374 weekly downloads. As such, next-hubspot popularity was classified as popular.
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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.