Photo Edit
Generated from public Vue/TypeScript exports by
pnpm docs:generate. Edit source comments and stories to update this reference. Types describe the declared API; browser/device constraints are covered in the guides. This catalog reflects source commitfc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.
PhotoEditPage
import { PhotoEditPage } from '@gxp-dev/app-ui'
Flow defaults: action None, result key editedBlob (when data/result is produced).
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
class | string | undefined | undefined | — |
backLabel | string | undefined | 'Back' | — |
submitLabel | string | undefined | 'Use this' | — |
showBack | boolean | undefined | true | — |
title | string | undefined | 'Edit your photo' | — |
subjects | SubjectOption[] | undefined | [] | — |
backdrops | BackdropOption[] | undefined | [] | — |
borderUrl | string | undefined | undefined | Optional foreground frame/border overlay. |
initialSubjectKey | string | undefined | undefined | — |
initialBackdropKey | string | undefined | undefined | — |
outputWidth | number | undefined | 1024 | Canvas size for the composite output. |
outputHeight | number | undefined | 1024 | — |
Events
| Name | Type | Required / default | Description |
|---|---|---|---|
back | [] | — | — |
next | [blob: Blob] | — | — |
exit | [] | — | — |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
header | {} | — | — |
subjects | { subjects: SubjectOption[]; selectedKey: string; select: (k: string) => string; } | — | — |
backdrops | { backdrop: BackdropOption; prev: () => void; next: () => void; } | — | — |
actions | { submit: () => void; back: () => void; } | — | — |
Examples
These are authored Storybook excerpts, not complete standalone modules. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Default
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import PhotoEditPageComponent from './PhotoEditPage.vue'
{
args: {
subjects: [
{ key: 'original', label: 'Original', imageUrl: 'https://placehold.co/600x600/000/fff?text=Subject' },
{ key: 'ai', label: 'AI cut-out', imageUrl: 'https://placehold.co/600x600/333/fff?text=AI' },
],
backdrops: [
{ key: 'a', label: 'Sunset', imageUrl: 'https://placehold.co/800x800/f97316/fff?text=A' },
{ key: 'b', label: 'Forest', imageUrl: 'https://placehold.co/800x800/16a34a/fff?text=B' },
{ key: 'c', label: 'Beach', imageUrl: 'https://placehold.co/800x800/0ea5e9/fff?text=C' },
],
},
render: (args) => ({
components: { PhotoEditPage: PhotoEditPageComponent },
setup: () => ({ args }),
template: '<div class="h-screen w-screen"><PhotoEditPage v-bind="args" /></div>',
}),
}