Skip to main content
The BeagleProvider component wraps your application to enable the Beagle inspector and logging functionality.

Props

boolean
default:"true"
Controls whether Beagle is enabled. When false, all logging is disabled and the inspector is not available. Useful for disabling Beagle in production builds.
(value: string) => Promise<void>
Optional function to handle copying text to clipboard. If not provided, copy functionality will be unavailable in the inspector.
'light' | 'dark'
default:"'light'"
Visual theme for the Beagle inspector interface.
React.ReactElement
required
Your application’s root component.

Usage

Conditional Rendering

The enabled prop allows you to conditionally enable Beagle based on your environment:
When disabled, BeagleProvider renders a minimal context provider with no-op functions, ensuring zero overhead in production.

Theme Support

Beagle supports both light and dark themes that automatically style the entire inspector interface: