Skip to content

usePluginArgs

usePluginArgs<TArgs>(): TArgs

Defined in: Context.tsx:366

Hook to access the plugin configuration args from within a plugin component.

This returns the args passed to Plugin.configure({ ... }). Use this hook inside your plugin component to access configuration.

TArgs

The type of the plugin args

TArgs

interface MyPluginConfig {
columns: string[];
title?: string;
}
function MyPluginPanel() {
const args = usePluginArgs<MyPluginConfig>();
// args.columns, args.title are available
return <div>{args.title}</div>;
}