Socket
Socket
Sign inDemoInstall

@next/third-parties

Package Overview
Dependencies
Maintainers
5
Versions
625
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@next/third-parties

`@next/third-parties` is a collection of components and utilities that can be used to efficiently load third-party libraries into your Next.js application.


Version published
Weekly downloads
392K
decreased by-17.11%
Maintainers
5
Weekly downloads
 
Created
Source

Experimental @next/third-parties

@next/third-parties is a collection of components and utilities that can be used to efficiently load third-party libraries into your Next.js application.

Note: @next/third-parties is still experimental and under active development.

Usage

Google Third-Parties

YouTube Embed

The YouTubeEmbed component is used to load and display a YouTube embed. This component loads faster by using lite-youtube-embed under the hood.

import { YouTubeEmbed } from '@next/third-parties/google'

export default function Page() {
  return <YouTubeEmbed videoid="ogfYd705cRs" height={400} />
}

Google Maps Embed

The GoogleMapsEmbed component can be used to add a Google Maps Embed to your page. By default, it uses the loading attribute to lazy-load below the fold.

import { GoogleMapsEmbed } from '@next/third-parties/google'

export default function Page() {
  return (
    <GoogleMapsEmbed
      apiKey="XYZ"
      height={200}
      width="100%"
      mode="place"
      q="Brooklyn+Bridge,New+York,NY"
    />
  )
}

To get a better idea of how these components work, take a look at this demo.

FAQs

Package last updated on 06 Mar 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc