npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

filerobot-image-editor-vue3

v1.0.8

Published

This is a Vue 3 wrapper component for the Filerobot Image Editor, a powerful and user-friendly image editor library. It provides an easy way to integrate advanced image editing features into your Vue 3 applications, enabling users to edit, crop, resize, a

Readme

filerobot-image-editor-vue3

A Vue 3 wrapper component for the Filerobot Image Editor — a powerful, browser-based image editor with cropping, resizing, annotation, finetune, filters, and watermark tools.

Installation

npm install filerobot-image-editor-vue3

Basic Usage

Wrap the component in a sized container. The editor fills 100% of its parent's height and width.

<script lang="ts" setup>
import { FilerobotImageEditorVue3, TABS, TOOLS } from 'filerobot-image-editor-vue3'
import type { IFilerobotImageEditorConfig } from 'filerobot-image-editor-vue3'

const editorConfig: IFilerobotImageEditorConfig = {
  source: 'https://example.com/image.jpg',
  tabsIds: [TABS.ADJUST, TABS.FINETUNE, TABS.ANNOTATE, TABS.FILTERS],
  defaultTabId: TABS.ADJUST,
  language: 'en',
  onSave: (savedImageData) => {
    console.log(savedImageData.imageBase64)
  },
}
</script>

<template>
  <!-- The editor fills its parent — give the parent an explicit height -->
  <div style="height: 600px; width: 100%;">
    <FilerobotImageEditorVue3 :config="editorConfig" />
  </div>
</template>

Important: The editor stretches to fill 100% of its parent's height. Always give the parent container an explicit height (e.g. height: 600px or height: 100vh). Without this the editor will collapse.


Props

| Prop | Type | Required | Description | |----------|-------------------------------|----------|--------------------------------------| | config | IFilerobotImageEditorConfig | ✅ | Full configuration object (see below) |


Exposed

| Name | Type | Description | |-------------------------------|-------|------------------------------------------| | filerobotImageEditorInstance | ref | Direct access to the underlying library instance |


Configuration Reference

Core

| Option | Type | Description | |--------|------|-------------| | source | string \| HTMLImageElement | Required. The image URL or element to edit. | | theme | Theme | Custom UI theme from @scaleflex/ui. | | loadableDesignState | ImageDesignState | Pre-load a previously saved design state. |

Tabs & Tools

| Option | Type | Description | |--------|------|-------------| | tabsIds | EditorTab[] | Ordered list of tabs to show. Defaults to all. Values: TABS.ADJUST, TABS.FINETUNE, TABS.FILTERS, TABS.WATERMARK, TABS.ANNOTATE, TABS.RESIZE. | | defaultTabId | EditorTab | Tab to activate on load. | | defaultToolId | EditorTool | Tool to activate within the default tab. |

Saving

| Option | Type | Description | |--------|------|-------------| | onSave | (data, designState) => void | Called when the user saves. data.imageBase64 contains the result. | | onBeforeSave | (data) => void \| false | Called before saving. Return false to cancel. | | showSaveButton | boolean | Show the default Save button. Default: true. | | disableSaveIfNoChanges | boolean | Disable Save when nothing has changed. | | removeSaveButton | boolean | Completely remove the Save button from the DOM. | | closeAfterSave | boolean | Close the editor after saving. | | defaultSavedImageName | string | Default filename for downloads. | | defaultSavedImageType | 'png' \| 'jpeg' \| 'jpg' \| 'webp' | Output format. | | defaultSavedImageQuality | number | Output quality (0–1). | | savingPixelRatio | number | Pixel ratio for the exported image. | | previewPixelRatio | number | Pixel ratio for the editor preview canvas. | | forceToPngInEllipticalCrop | boolean | Force PNG output when using elliptical crop. | | moreSaveOptions | SaveOption[] | Additional entries in the save dropdown. |

Lifecycle Callbacks

| Option | Type | Description | |--------|------|-------------| | onModify | (state: ImageDesignState) => void | Fired on every design change. | | onClose | (reason, hasUnsavedChanges) => void | Fired when the editor is closed. |

General Editor Settings

| Option | Type | Description | |--------|------|-------------| | avoidChangesNotSavedAlertOnLeave | boolean | Suppress the browser "unsaved changes" dialog. | | resetOnImageSourceChange | boolean | Reset state when source changes. | | showBackButton | boolean | Show a Back button in the top bar. | | observePluginContainerSize | boolean | Auto-adjust layout on container resize. | | showCanvasOnly | boolean | Hide all UI, show only the canvas. | | useZoomPresetsMenu | boolean | Show the zoom preset menu. | | disableZooming | boolean | Disable all zooming. | | noCrossOrigin | boolean | Set crossOrigin=anonymous on the image. | | backgroundColor | string | Editor workspace background color. |

UI Visibility — Top Bar Buttons

| Option | Type | Description | |--------|------|-------------| | noUndoButton | boolean | Hide the Undo button from the top bar. | | noRedoButton | boolean | Hide the Redo button from the top bar. | | noResetButton | boolean | Hide the Reset button from the top bar. |

Custom Extension: Sidebar Undo Tab

| Option | Type | Description | |--------|------|-------------| | withUndoButtonAsTab | boolean | Custom Extension. Injects an Undo tab into the sidebar tab list, synced with the top-bar Undo button's disabled state. Useful when the top bar is hidden. | | noUndoButtonAsTab | boolean | Hides the native undo/history tab from the sidebar (available in some library versions). |


Crop Options

Crop?: {
  ratio?: 'original' | 'custom' | 'ellipse' | number
  noPresets?: boolean
  noRotate?: boolean
  noFlipX?: boolean
  noFlipY?: boolean
  withResize?: boolean
  minWidth?: number
  minHeight?: number
  maxWidth?: number
  maxHeight?: number
  autoResize?: boolean
  lockCropAreaAt?: 'top-left' | 'top-center' | ... // 9 positions
  presetsItems?: CropPresetItem[]
  presetsFolders?: CropPresetFolder[]
}

| Option | Description | |--------|-------------| | ratio | Default crop ratio. | | noPresets | Hide the crop presets/ratio menu. | | noRotate | Hide the Rotate button from the Crop toolbar. | | noFlipX | Hide the Flip X button from the Crop toolbar. | | noFlipY | Hide the Flip Y button from the Crop toolbar. | | withResize | Custom Extension. Embeds Resize as a sub-step inside the Crop tab. Hides the standalone Resize sidebar tab and adds a Resize button to the Crop toolbar and a Back to Crop button to the Resize toolbar. |


Finetune Options

All are boolean. Setting to true hides that control.

| Option | Hides | |--------|-------| | noBrightness | Brightness slider | | noContrast | Contrast slider | | noHueSaturationValue | Hue / Saturation / Value sliders | | noWarmth | Warmth slider | | noBlur | Blur slider | | noThreshold | Threshold slider | | noPosterize | Posterize slider | | noPixelate | Pixelate slider | | noNoise | Noise slider |


Filters

Pass an allow-list of filter names to restrict what the user sees:

Filters: ['Original', 'Black & White', 'Sepia', 'Solarize', 'Invert']

Annotation Tools

All annotation types extend AnnotationsCommon:

| Common Option | Description | |---------------|-------------| | noFill | Hide fill color picker. | | noOpacity | Hide opacity control. | | noStroke | Hide stroke control. | | noShadow | Hide shadow control. | | noPosition | Hide position control. |

Text — Additional Options

| Option | Description | |--------|-------------| | noFontFamily | Hide font family selector. | | noFontSize | Hide font size control. | | noBold | Hide bold toggle. | | noItalic | Hide italic toggle. | | noAlignment | Hide text alignment control. | | noTextSpacing | Hide letter/line spacing controls. | | fonts | Custom font list: string[] or { label, value }[]. | | text | Default text for new text annotations. |

Watermark Options

| Option | Description | |--------|-------------| | gallery | Array of preset watermark image URLs. | | textScalingRatio | Scale ratio for text watermarks (0–1). | | imageScalingRatio | Scale ratio for image watermarks (0–1). | | hideTextWatermark | Hide the text watermark option. | | noOpacity | Hide opacity control for watermarks. |


Localization

| Option | Type | Description | |--------|------|-------------| | language | 'en' \| 'fr' \| ... | Editor UI language. Supported: en, fr, de, it, pt, es, nl, pl, ro. | | translations | object | Override or extend any translation key. See src/utils/lang/en.ts for all keys. |

Example — override a tab label:

translations: {
  adjustTab: 'Crop & Adjust',
  resizeTab: 'Image Size',
}

Cloudimage Integration

| Option | Type | Description | |--------|------|-------------| | useCloudimage | boolean | Enable Cloudimage processing mode. | | cloudimage | object | Cloudimage-specific config (token, domain, version, etc.). | | useBackendTranslations | boolean | Use translations from the Cloudimage backend. |


Layout Requirements

The component renders to 100% of its parent's size. You must give the parent an explicit height:

<!-- ✅ Correct -->
<div style="height: 100vh;">
  <FilerobotImageEditorVue3 :config="config" />
</div>

<!-- ❌ Will collapse — no height defined -->
<div>
  <FilerobotImageEditorVue3 :config="config" />
</div>

Full Example

<script lang="ts" setup>
import { ref } from 'vue'
import { FilerobotImageEditorVue3, TABS, TOOLS } from 'filerobot-image-editor-vue3'
import type { IFilerobotImageEditorConfig } from 'filerobot-image-editor-vue3'

const editorRef = ref(null)

const config: IFilerobotImageEditorConfig = {
  source: 'https://example.com/photo.jpg',

  tabsIds: [TABS.ADJUST, TABS.FINETUNE, TABS.FILTERS, TABS.ANNOTATE],
  defaultTabId: TABS.ADJUST,

  Crop: {
    ratio: 'custom',
    noRotate: true,
    noFlipX: true,
    noFlipY: true,
    withResize: true,   // Embeds Resize inside the Crop tab
  },

  Finetune: {
    noBrightness: false,
    noBlur: true,
    noNoise: true,
    noPosterize: true,
    noPixelate: true,
    noThreshold: true,
  },

  Filters: ['Original', 'Black & White', 'Sepia'],

  Text: {
    noFontFamily: true,
    noBold: true,
    noItalic: true,
    text: 'Add text...',
  },

  language: 'en',
  withUndoButtonAsTab: true,  // Adds Undo to the sidebar
  noUndoButton: true,
  noRedoButton: true,
  noResetButton: true,

  showSaveButton: false,
  disableSaveIfNoChanges: true,
  avoidChangesNotSavedAlertOnLeave: true,

  onSave: (data) => {
    console.log('Saved:', data.fullName, data.imageBase64)
  },
}
</script>

<template>
  <div style="height: 100vh; width: 100%;">
    <FilerobotImageEditorVue3 ref="editorRef" :config="config" />
  </div>
</template>

Development

npm install       # Install dependencies
npm run dev       # Start dev server with hot-reload
npm run build     # Build the library bundle
npm run lint      # Lint source files

License

MIT — see LICENSE for details.