react-airbnb-embed
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i react-airbnb-embed

Weekly Downloads

3

Version

1.0.7

License

MIT

Unpacked Size

12.8 kB

Total Files

21

Last publish

Collaborators

  • matyik