Gathering detailed insights and metrics for @toast-ui/react-image-editor
Gathering detailed insights and metrics for @toast-ui/react-image-editor
Gathering detailed insights and metrics for @toast-ui/react-image-editor
Gathering detailed insights and metrics for @toast-ui/react-image-editor
🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
npm install @toast-ui/react-image-editor
Typescript
Module System
Node Version
NPM Version
JavaScript (90.1%)
Stylus (4.44%)
HTML (3.38%)
TypeScript (0.97%)
CSS (0.79%)
Vue (0.33%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
7,370 Stars
659 Commits
1,341 Forks
103 Watchers
37 Branches
34 Contributors
Updated on Jul 16, 2025
Latest Version
3.15.2
Package Id
@toast-ui/react-image-editor@3.15.2
Unpacked Size
42.33 kB
Size
14.82 kB
File Count
5
NPM Version
7.7.6
Node Version
15.14.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This is a React component wrapping TOAST UI Image Editor.
React Wrapper of TOAST UI Image Editor applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI Image Editor is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. > “ui.toast.com") is to be collected and the sole purpose is nothing but to measure statistics on the usage. To disable GA, use the usageStatistics
props like the example below.
1<ImageEditor usageStatistics={false} />
Or, include tui-code-snippet.js
(v1.4.0 or later) and then immediately write the options as follows:
1tui.usageStatistics = false;
1npm install --save @toast-ui/react-image-editor
You can use Toast UI Image Editor for React as a ECMAScript module or a CommonJS module. As this module does not contain CSS files, you should import tui-image-editor.css
from tui-image-editor/dist
manually.
1import 'tui-image-editor/dist/tui-image-editor.css'; 2import ImageEditor from '@toast-ui/react-image-editor';
1require('tui-image-editor/dist/tui-image-editor.css'); 2const ImageEditor = require('@toast-ui/react-image-editor');
All the options of the TOAST UI Image Editor are supported in the form of props.
1const myTheme = { 2 // Theme object to extends default dark theme. 3}; 4 5const MyComponent = () => ( 6 <ImageEditor 7 includeUI={{ 8 loadImage: { 9 path: 'img/sampleImage.jpg', 10 name: 'SampleImage', 11 }, 12 theme: myTheme, 13 menu: ['shape', 'filter'], 14 initMenu: 'filter', 15 uiSize: { 16 width: '1000px', 17 height: '700px', 18 }, 19 menuBarPosition: 'bottom', 20 }} 21 cssMaxHeight={500} 22 cssMaxWidth={700} 23 selectionStyle={{ 24 cornerSize: 20, 25 rotatingPointOffset: 70, 26 }} 27 usageStatistics={true} 28 /> 29);
Importing black/white-theme.js
file is not working directly import yet. You want to use a white theme, please write own theme object by copy and paste.
For using instance methods of TOAST UI Image Editor, first thing to do is creating Refs of wrapper component using createRef()
. But the wrapper component does not provide a way to call instance methods of TOAST UI Image Editor directly. Instead, you can call getInstance()
method of the wrapper component to get the instance, and call the methods on it.
1const imageEditorOptions = { 2 // sort of option properties. 3}; 4 5class MyComponent extends React.Component { 6 editorRef = React.createRef(); 7 8 handleClickButton = () => { 9 const editorInstance = this.editorRef.current.getInstance(); 10 11 editorInstance.flipX(); 12 }; 13 14 render() { 15 return ( 16 <> 17 <ImageEditor ref={this.editorRef} {...imageEditorOptions} /> 18 <button onClick={this.handleClickButton}>Flip image by X Axis!</button> 19 </> 20 ); 21 } 22}
An instance of the wrapper component also provides a handy method for getting the root element. If you want to manipulate the root element directly, you can call getRootElement
to get the element.
1class MyComponent extends React.Component { 2 editorRef = React.createRef(); 3 4 handleClickButton = () => { 5 this.editorRef.current.getRootElement().classList.add('image-editor-root'); 6 }; 7 8 render() { 9 return ( 10 <> 11 <ImageEditor ref={this.editorRef} {...imageEditorOptions} /> 12 <button onClick={this.handleClickButton}>Click!</button> 13 </> 14 ); 15 } 16}
All the events of TOAST UI Image Editor are supported in the form of on[EventName]
props. The first letter of each event name should be capitalized. For example, for using mousedown
event you can use onMousedown
prop like the example below.
1class MyComponent extends React.Component { 2 handleMousedown = () => { 3 console.log('Mouse button is downed!'); 4 }; 5 6 render() { 7 return <ImageEditor onMousedown={this.handleMousedown} />; 8 } 9}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
Found 8/25 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
97 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More