React-MolViewer

React-MolViewer

A React component for displaying molecules using JSmol.

react-molviewer

Using It in Your Application

Import the component.

import { MolViewer } from 'react-molviewer';

Use the component with the necessary props.

<MolViewer ... />

Props
Name Type Description Required
molContent string/binary the content of the molecule yes
viewType string the identifier type of the input, it is one of the string 'mol' or 'file' yes
fnInit function is called when the viewer has started loading no
fnCb function is called when the viewer has completed loading no
jmScripts An array of strings additional Jmol/JSmol scripts no

Run the Demo Application

A demo project for the react-molviewer library is available at react-molviewer-demo.

Special thanks to Jmol/JSmol

Jmol: an open-source Java viewer for chemical structures in 3D. http://www.jmol.org

Feedback

We appreciate your feedback regarding any challenges you may be facing with the current schema or any ideas you have for improvements.

Please feel free to reach out through the