JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 777
  • Score
    100M100P100Q101077F
  • License MIT

React component to embed Slise into your website

Package Exports

  • @slise/embed-react
  • @slise/embed-react/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@slise/embed-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@slise/embed-react

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

React component to embed Slise into your website

Install

npm install @slise/embed-react

or

yarn add @slise/embed-react

Usage

import { SliseAd } from '@slise/embed-react'

export const App: React.FC = () => {
    return (
        <div>
            <p>Leaderboard example:</p>
            <SliseAd
                style = {{ display: "inline-block", width: "728px", height: "90px" }}
                slotId = "1"
                pub = "pub-12345"
                format = "728x90,364x45"
            />
        </div>
    )
}

API

type SliseAdProps

slotId

Type: string

Unique ID of the slot across all the pages on your website.

pub

Type: string

Publisher ID (provided by Slise).

format

Type: string

Comma-separated list of the ad formats that you want to be shown in this slot.

style?

Type: React.CSSProperties

You can add any valid React CSS styles to the ad.

SliseAd(props: SliseAdProps)

Displays Slise ad in an iframe.