React components integrating OpenChemLib.
These react component allows to display and edit molfile and smiles.
npm install openchemlib react-ocl
import { SmilesSvgRenderer } from 'react-ocl';
function MyComponent() {
return <SmilesSvgRenderer smiles="COCCOOOCO" />;
}
This library is available in three versions, like openchemlib: react-ocl/minimal
(also available as react-ocl
), react-ocl/core
and react-ocl/full
.
react-ocl/full
.react-ocl/base
.See https://react-ocl.pages.dev for detailed usage examples.