Wondering what’s next for npm?Check out our public roadmap! »

    react-cookienotice

    3.7.0 • Public • Published

    react-cookienotice

    An awesome cookie banner for your website

    Preview Light Preview Dark

    NPM JavaScript Style Guide codecov npm-publish downloads

    Live preview

    Install

    Yarn

    yarn add react-cookienotice

    npm

    npm i --save react-cookienotice

    Usage

    import * as React from 'react'
    import CookieNotice from 'react-cookienotice'
    
    class Example extends React.Component {
      render() {
        return <CookieNotice />
      }
    }

    Props

    All props are optionals

    Key Type Description Default value
    acceptButtonLabel string Edit the "Accept" button label Accept
    readMoreButtonLabel string Edit the "Read more" button label Read more
    readMoreButtonLink string Edit the "Read more" button link http://aboutcookies.org/
    openInNewTab boolean Open the "Read more" button link in a new tab true
    cookieTextLabel string Main cookie notice label This website uses cookies to improve your browsing experience.
    reverseButtons boolean Reverse buttons direction false
    borderRadius number Cookie notice border radius (in px) 32
    justifyContent string justify-content property for wrapper (space-around or space-between) space-between
    maxWidth number Maximum cookie notice width 1000
    cookieExpiration number Days after cookie expires and user should reaccept cookies 30
    cookieName string The name of the cookie that saves the user consent allow-cookies
    darkTheme boolean Enable dark theme Auto

    License

    MIT © xavierbriole

    Install

    npm i react-cookienotice

    DownloadsWeekly Downloads

    44

    Version

    3.7.0

    License

    MIT

    Unpacked Size

    90.2 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar