Back to reference

GrammarlyButtonElement

<grammarly-button> is a web component that allows you to place the Grammarly button in a custom position in your app.

The Grammarly button can only display once per page. Its location is set and displayed according to the earliest inclusion of <grammarly-button>.

declare class GrammarlyButtonElement extends HTMLElement {
  get menuPosition(): MenuPosition | undefined;
  get tonePosition(): TonePosition | undefined;
}

Properties

menuPositionType: MenuPosition | undefinedDefault: "left"

Position of the Grammarly button menu relative to the Grammarly button.

Since: v2.1.0

Example:

<grammarly-button menu-position="left"></grammarly-button>
tonePositionType: TonePosition | undefinedDefault: "left"

The position of the tone detectoropen in new window (if present) relative to the Grammarly button.

Example:

<grammarly-button tone-position="left"></grammarly-button>
Last Updated: 4/12/2023, 3:24:55 PM