Skip to main content
key
string
required
The environment key to set. Standard keys include "colorScheme", "dynamicTypeSize", and other system-defined values.
value
any
required
The value to set for the given key. The type depends on the key being set.

Support

Usage

Set color scheme via environment

Pass custom environment values

Notes

Environment values propagate down the component tree to all descendants. Child components can read these values using the useEnvironment hook. This is the general-purpose mechanism behind more specific modifiers like colorScheme and dynamicTypeSize.

See Also