All Projects β†’ hustcc β†’ React Adsense

hustcc / React Adsense

Licence: mit
πŸ“½ a simple React-component for Google AdSense / Baidu advertisement.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Adsense

Video React
A web video player built for the HTML5 world using React library.
Stars: ✭ 2,227 (+960.48%)
Mutual labels:  react-component
React Anchor Link Smooth Scroll
React component for anchor links using the smooth scroll polyfill.
Stars: ✭ 186 (-11.43%)
Mutual labels:  react-component
React Native Pdfview
πŸ“š PDF viewer for React Native
Stars: ✭ 198 (-5.71%)
Mutual labels:  react-component
React Translated
A dead simple way to add complex translations (i18n) in a React (DOM/Native) project 🌎🌍🌏
Stars: ✭ 176 (-16.19%)
Mutual labels:  react-component
React Mobile Picker
An iOS like select box component for React
Stars: ✭ 180 (-14.29%)
Mutual labels:  react-component
React Native Image Viewer
πŸš€ tiny & fast lib for react native image viewer pan and zoom
Stars: ✭ 2,334 (+1011.43%)
Mutual labels:  react-component
Animate Css Styled Components
simple port of animate css for styled-components
Stars: ✭ 173 (-17.62%)
Mutual labels:  react-component
React Reorder
Drag & drop, touch enabled, reorderable / sortable list, React component
Stars: ✭ 209 (-0.48%)
Mutual labels:  react-component
React Native Card Flip
Card flip animation for React Native
Stars: ✭ 183 (-12.86%)
Mutual labels:  react-component
React Md Spinner
Material Design spinner components for React.js.
Stars: ✭ 195 (-7.14%)
Mutual labels:  react-component
React Credit Cards
Beautiful credit cards for your payment forms
Stars: ✭ 2,239 (+966.19%)
Mutual labels:  react-component
React Rater
⭐️ Interative & customizable star rater
Stars: ✭ 180 (-14.29%)
Mutual labels:  react-component
React Datepicker2
react datepicker component.(include persian jalaali calendar)
Stars: ✭ 191 (-9.05%)
Mutual labels:  react-component
React Awesome Slider
React content transition slider. Awesome Slider is a 60fps, light weight, performant component that renders an animated set of production ready UI general purpose sliders with fullpage transition support for NextJS and GatsbyJS. πŸ–₯️ πŸ“±
Stars: ✭ 2,343 (+1015.71%)
Mutual labels:  react-component
React Times
A time picker react component, no jquery-rely
Stars: ✭ 206 (-1.9%)
Mutual labels:  react-component
React Component Echarts
React component echarts. 组仢式百度图葨。
Stars: ✭ 175 (-16.67%)
Mutual labels:  react-component
React Country Region Selector
Country / region React select boxes for your forms.
Stars: ✭ 189 (-10%)
Mutual labels:  react-component
React Code Input
React component for entering and validating PIN code.
Stars: ✭ 207 (-1.43%)
Mutual labels:  react-component
React Input Color
React color picker
Stars: ✭ 208 (-0.95%)
Mutual labels:  react-component
React Voice Components
Set of React components that use the Web Speech API to bring voice experience to React applications
Stars: ✭ 195 (-7.14%)
Mutual labels:  react-component

react-adsense

react-adsense is a React-component for Google AdSense / Baidu advertisement.

Build Status npm npm npm demo

1. Install

npm install --save react-adsense

Before use Google AdSense, you should add the script at the end of HTML.

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

2. Usage

import React from 'react';
import AdSense from 'react-adsense';

// ads with no set-up
<AdSense.Google
  client='ca-pub-7292810486004926'
  slot='7806394673'
/>

// ads with custom format
<AdSense.Google
  client='ca-pub-7292810486004926'
  slot='7806394673'
  style={{ width: 500, height: 300, float: 'left' }}
  format=''
/>

// responsive and native ads
<AdSense.Google
  client='ca-pub-7292810486004926'
  slot='7806394673'
  style={{ display: 'block' }}
  layout='in-article'
  format='fluid'
/>

// auto full width responsive ads
<AdSense.Google
  client='ca-pub-7292810486004926'
  slot='7806394673'
  style={{ display: 'block' }}
  format='auto'
  responsive='true'
  layoutKey='-gw-1+2a-9x+5c'
/>

3. Props

  • Required props:
    • client
    • slot
  • Optional props:
    • className:
    • style:
    • layout:
    • layoutKey:
    • format:
    • responsive:

4. TODO

  • Baidu advertisement supported.

LICENSE

[email protected]hustcc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].