ProvideComponentDefaults

@Composable
fun ProvideComponentDefaults(value: ProvidedComponentDefault<*>, content: @Composable () -> Unit)

Scopes a single inherited component default declaration over content.

Applicable modifier declarations from value cascade onto every descendant Swing and menu node, evaluated before the node's own explicit modifier.

This function is target-polymorphic and can be invoked from ordinary Swing composable contexts as well as menu composable contexts.

Must be called on the Event Dispatch Thread (EDT).

Parameters

value

the provision token binding a key to a value or null.

content

the composables scoped by this component default.


@Composable
fun ProvideComponentDefaults(vararg values: ProvidedComponentDefault<*>, content: @Composable () -> Unit)

Scopes multiple inherited component default declarations over content.

Provisions are applied in argument order: repeating a key is last-argument-wins.

Applicable modifier declarations cascade onto every descendant Swing and menu node, evaluated before the node's own explicit modifier.

This function is target-polymorphic and can be invoked from ordinary Swing composable contexts as well as menu composable contexts.

Must be called on the Event Dispatch Thread (EDT).

Parameters

values

the provision tokens to cascade.

content

the composables scoped by these component defaults.