A React component for displaying molecules using JSmol.
Import the component.
import { MolViewer } from 'react-molviewer';
Use the component with the necessary props.
<MolViewer ... />
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 |
A demo project for the react-molviewer
library is available at react-molviewer-demo.
Jmol: an open-source Java viewer for chemical structures in 3D. http://www.jmol.org
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