Skip to main content

CSPProvider

Provides a default Content Security Policy (CSP) configuration for Base UI components that require inline <style> or <script> tags.

Import

Component Signature

Props

React.ReactNode
The content to be wrapped by the CSP provider.
string | undefined
The nonce value to apply to inline <style> and <script> tags.
boolean | undefined
default:"false"
Whether inline <style> elements created by Base UI components should not be rendered. Instead, components must specify the CSS styles via custom class names or other methods.

Type Definitions

CSPProvider.Props

CSPProvider.State

Usage Example