Socket
Socket
Sign inDemoInstall

downloadbutton

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

downloadbutton

A component to download a js-generated file


Version published
Weekly downloads
114
decreased by-9.52%
Maintainers
1
Weekly downloads
 
Created
Source

View this page rendered at notablemind.github.io/downloadbutton

DownloadButton is a simple component for letting the user download a javascript-generated file. It was extracted from Notablemind.

The styling is due to materializecss, and does not come with the DownloadButton component. In some examples, FontAwesome icons are also used. You are free to style the component however you wish.

Demo

// @demobox
function makeFile() {
  // do some calculations
  return {
    mime: 'text/plain',
    filename: 'myexportedfile.txt',
    contents: 'all of the exports',
  }
}


<DownloadButton
  // these classes come from materializecss
  className='waves-effect waves-light btn' 
  genFile={makeFile}/>

For more demos, see the demo page.

Node Start

npm install downloadbutton
var DownloadButton = require('downloadbutton')



Keywords

FAQs

Package last updated on 27 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc