react-base64
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

react-base64

A simple React.js component to handle encoding and decoding of base64 data.

Usage

import Base64 from 'react-base64'

const DATA = "SGVsbG8sIFdvcmxkIQo="


const DataRender = () => {
  return <Base64 mode="decode" data={DATA}/>
}

The library also includes a Base64Raw component that will render the data without wrapping it in a HTML <p> tag first.

import Base64Raw from 'react-base64'

const DATA = "SGVsbG8sIFdvcmxkIQo="


const DataRender = () => {
  return <Base64Raw mode="decode" data={DATA}/>
}

Installation

yarn add react-base64

Readme

Keywords

none

Package Sidebar

Install

npm i react-base64

Weekly Downloads

12

Version

1.2.0

License

MIT

Unpacked Size

550 kB

Total Files

19

Last publish

Collaborators

  • joshburnsxyz