1.0.3 • Published 6 years ago

react-offscreen v1.0.3

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

react-offscreen

A react component for offscreen text

Installation

npm i --save react-offscreen

Usage

import Offscreen from 'react-offscreen';

const app = (
  <Offscreen>I am offscreen text!</Offscreen>
);

Props

  • tag {String} (optional): desired tag for offscreen element (defaults to 'span')
  • children {Array|Object|String} (required): any valid react children

tag prop examples

const offscreenParagraph = (<Offscreen tag='p'>Hello World!</Offscreen>);
const offscreenList = (
  <Offscreen tag='ul'>
    <li>foo</li>
    <li>bar</li>
    <li>baz</li>
  </Offscreen>
)

See demo/ directory for more examples

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago