react-molviewer

1.0.1 • Public • Published

react-molviewer

npm version Downloads

A React application for displaying molecules using JSmol.

screen

How to run

With Yarn

  • install dependencies
yarn install
  • build
yarn build

Run in development mode

yarn start

default port is 8080

Demo: show the molecule

How to use react-molviewer in your application

  • import the component
  import { MolViewer } from 'react-molviewer';
  • render the component with props
  <MolViewer ... />

Props

Name Type Description Required
molContent blob the content of the molecule yes
viewType string the identifier type of the view, it is a string starts with 'mol', e.g. 'mol_caffeine' yes
fnInit function is used to notify the parent component that the viewer has started loading the molecule no
fnCb function is used to notify the parent component that the viewer has completed loading the molecule no

Contact Us 📧

If you have any questions or suggestions, please contact the contributors:

Thank you JSmol

JSmol: an open-source HTML5 viewer for chemical structures in 3D

Package Sidebar

Install

npm i react-molviewer

Weekly Downloads

6

Version

1.0.1

License

MIT

Unpacked Size

28.6 MB

Total Files

1483

Last publish

Collaborators

  • cllnpm
  • paggy