Skip to content

matyik/react-airbnb-embed

Repository files navigation

react-airbnb-embed

NPM GitHub stars NPM Downloads

A React component that allows you to embed an Airbnb listing in your web application. Compatible with server-side rendering using Next.js.

Installation

You can install the package via npm:

npm install react-airbnb-embed

Usage

Once installed, you can use the Airbnb component by importing it in your code and passing the necessary props.

import React from 'react'
import { Airbnb } from 'react-airbnb-embed'

const MyComponent = () => {
  return <Airbnb id='123456' name='Listing' />
}

export default MyComponent

Props

The Airbnb component accepts the following props:

  • id (required): The ID of the Airbnb listing that you want to embed.
  • name (required): The name of the Airbnb listing that you want to embed.
  • reviews (optional, default true): Whether to show or hide the reviews section.
  • nofollow (optional, default false): Whether to add the nofollow attribute to the links.

License

This package is open-sourced software licensed under the MIT license.

About

A simple React component for embedding an Airbnb listing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published