See the Text Editor SDK for React guide for installation options.

The SDK for React is a thin wrapper around the Text Editor SDK that keeps the same basic API but provides it as a component: GrammarlyEditorPlugin. This component accepts an optional config prop to configure the SDK according to your app's needs:

<GrammarlyEditorPlugin clientId="YOUR_CLIENT_ID" config={{ documentDialect: "british" }}>

To use Grammarly throughout your app, use the Grammarly context provider and give it the same props.

Refer to EditorConfig for full configuration details.


CSS variables that allow you to theme your app are detailed in Customization.


GrammarlyAn optional context provider component for GrammarlyEditorPlugin.
GrammarlyButtonShow the Grammarly button in a custom position. The Grammarly button can only display once per page. Its location is set and displayed according to the earliest inclusion of <GrammarlyButton>.
GrammarlyButtonPropsProps for <GrammarlyButton>.
GrammarlyEditorPluginComponent that enhances textareas, inputs or contenteditables with the Grammarly experience.
GrammarlyEditorPluginPropsProps for <GrammarlyEditorPlugin>.
GrammarlyPropsProps for <Grammarly>.
Last Updated: 4/12/2023, 3:24:55 PM