JSPM

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

🦄 Put unicorns and rainbows on any website on the Internet with a single React Hook!

Package Exports

  • use-cornify

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 (use-cornify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

🦄 Unicorns and Rainbows on-demand with this React Hook!

The Cornify script gives you the magical power to put unicorns and rainbows on any website on the Internet. Since 2009, it has served over 400 million unicorns and rainbows. How wonderful indeed.

And today: You can use it as a React Hook!

🎉 How to use the hook

const { remove } = useCornify({
  keys: ['ArrowUp', 'ArrowDown', 'Enter'],
  addCupcakeButton: false,
  addMagicalWords: false,
  younicorns: '12,957,826,716,386'
})

// To manually remove all unicorns
remove()

🙈 Add summing Younicorns

These days, you can create your own personal unicorns on Cornify. They are called Younicorns. If you want the Cornify script to show your Younicorns, you can provide a list of Younicorn IDs to the script, like this:

useCornify({ younicorns: "12,957,826,716,386" });

To find the IDs, navigate your browser to a Younicorn page and look at the URL. It will include a number - that's the ID.

🙌 Credits

Big thanks to: Unicorns & Rainbows On-Demand http://www.cornify.com