The demo is the main thing people try before adopting the component, but several documented options are never exercised in it:
| Option |
Status in demo |
projectId + features.ai (AI Assistant) |
not wired — the README's headline feature can't be tried |
translations |
not wired |
features.imageEditor.dock ('left' | 'right') |
not wired |
custom tool icons (tools.crop: { icon }) |
not wired |
features.imageEditor.tools.corners |
not in TOOL_NAMES |
offline / licenseUrl / env |
not wired |
scriptUrl |
not wired |
demo/src/Sidebar.tsx currently covers theme, locale (5 of the 10 bundled locales) and the 8 tool toggles.
The AI Assistant one is the notable gap — it needs a projectId, so it would have to come from a Vite env var (import.meta.env.VITE_UNLAYER_PROJECT_ID) with the panel hidden when unset, plus a .env.example. dock and the custom-icon form are cheap additions that would double as living documentation for the README's Tools section.
Unrelated small bug in the same file
snapshot() in demo/src/App.tsx#L83-L89 fabricates the blob:
setSaved({ dataUrl, blob: new Blob() });
The Download link works (it uses dataUrl), but the object is a lie about the ImageEditorSaveResult shape — anyone reading the demo to learn the API sees an empty Blob presented as a valid result. Either build a real blob from the data URL or give the snapshot path its own type that doesn't claim to be a save result.
The demo is the main thing people try before adopting the component, but several documented options are never exercised in it:
projectId+features.ai(AI Assistant)translationsfeatures.imageEditor.dock('left' | 'right')tools.crop: { icon })features.imageEditor.tools.cornersTOOL_NAMESoffline/licenseUrl/envscriptUrldemo/src/Sidebar.tsxcurrently covers theme, locale (5 of the 10 bundled locales) and the 8 tool toggles.The AI Assistant one is the notable gap — it needs a
projectId, so it would have to come from a Vite env var (import.meta.env.VITE_UNLAYER_PROJECT_ID) with the panel hidden when unset, plus a.env.example.dockand the custom-icon form are cheap additions that would double as living documentation for the README's Tools section.Unrelated small bug in the same file
snapshot()indemo/src/App.tsx#L83-L89fabricates the blob:The Download link works (it uses
dataUrl), but the object is a lie about theImageEditorSaveResultshape — anyone reading the demo to learn the API sees an emptyBlobpresented as a valid result. Either build a real blob from the data URL or give the snapshot path its own type that doesn't claim to be a save result.