Package Exports
- @lokasketch/core
- @lokasketch/core/styles.css
Readme
@lokasketch/core
A powerful, client-side image design editor SDK built with React and Konva.
Installation
npm install @lokasketch/coreQuick Start
import { CustomEditor } from '@lokasketch/core'
import '@lokasketch/core/styles.css'
function MyApp() {
return (
<CustomEditor
width={800}
height={600}
config={{
apiKey: 'your-api-key',
}}
onDesignChange={(json) => {
console.log('Design changed:', json)
}}
/>
)
}Features
- 🎨 Canvas Editor - Drag, resize, rotate elements
- 📝 Text Elements - Customizable fonts, colors, alignment
- 🔷 Shapes - SVG-based shapes with fill/stroke
- ✏️ Freehand Drawing - Draw with customizable brush
- 🖼️ Images - Upload, resize, flip, borders
- 📚 Layers Panel - Visual layer management
- 🔄 Undo/Redo - Full history management
- 📤 Export - PNG, JPG, PDF, SVG formats
- 💾 JSON Persistence - Save and load designs
Documentation
See the main Custom Editor documentation for complete API reference, examples, and configuration options.
Dependencies
react(>=17.0.0) - React libraryreact-dom(>=17.0.0) - React DOMkonva- 2D canvas libraryreact-konva- React bindings for Konvazustand- State managementimmer- Immutable state updates@lokasketch/types- Type definitions@lokasketch/utils- Utility functions
License
MIT