Augeo AI Docs
Augeo Design SystemComponents

ProfilePhotoCrop

The member's photo picker and the "Adjust your image" dialog it opens. The member positions and zooms the photo in a round crop, and saves a square PNG to the host.

ProfilePhotoCrop

ProfilePhotoCrop is a hidden file picker and the dialog that adjusts the chosen photo. Its ref is the picker, so the host's photo button calls ref.current.click() inside its own press handler. A browser opens a picker only during a press, so a click from an effect or a timer does nothing. The host owns the value, and the dialog is open while the value is set. The editor hands over to the dialog and takes back over when it closes, because a dialog never opens over a dialog. The cropper is react-easy-crop, so dragging, pinching, the wheel and the arrow keys all move the photo. Save renders the crop and hands it over asynchronously, and a result that lands after unmount is dropped. A read failure calls onUnreadable and emits media.failed with no source and no file name on purpose, because both identify a person.

Storybook

Loading

Props

Prop

Type

Tokens

Derived from the component source at docs-generation time — these are the --augds-* variables it reads. Re-theme the colour slots by constructing a partner DesignSystemTheme and wrapping the consumer subtree in <ThemeProvider>, never by hard-coding values.

  • --augds-border-default
  • --augds-border-subtle
  • --augds-color-alpha-white-40
  • --augds-foreground-tertiary
  • --augds-interaction-focus-ring
  • --augds-shadow-sm-element
  • --augds-surface-current

Source

  • src/components/ui/profile-photo-crop/profile-photo-crop.tsx