Skip to main content
You're viewing documentation for a previous version of this software.Switch to the latest stable version

Focus

The focus tool of the PhotoEditor SDK for HTML5 lets your users add a radial or linear blur to their images. Learn how to configure the tool.

Focus tool

The focus tool allows your users to add a radial or linear blur to their images which lets them mimic Tilt Shift or Bokeh effects.

Specifying which focus modes are available

In order to enable or disable specific focus modes, simply pass the availableModes option to the focus controls. This option should be an array of focus identifiers of which the following are available: radial, mirrored, linear, gaussian.

const editor = new PhotoEditorSDK.UI.DesktopUI({
  editor: {
    controlsOptions: {
      focus: {
        availableModes: ['radial', 'mirrored', 'linear', 'gaussian'],
      },
    },
  },
});