Layer Provider@astryxdesign/core v0.5.2 · LayerProvider
Usage
Layer utilities provide the app-level provider used by overlay systems. Use LayerProvider at the app root for toast/layer configuration; use higher-level Popover, HoverCard, or Tooltip APIs for most overlay UI.
tsimport {LayerProvider} from '@astryxdesign/core/Layer'
Best practices
| Guidance | Practices |
|---|---|
| Do | Use LayerProvider once near the app root when you need shared toast/layer configuration. |
| Do | Build on higher-level components like Popover, HoverCard, and Tooltip for common overlay patterns. |
| Don't | Add nested LayerProvider instances: nested providers are ignored and add unnecessary tree depth. |
Props
| Prop | Type | Description |
|---|---|---|
childrenrequired | ReactNode | Application subtree that can use the shared layer context. |
toast | LayerToastConfig | Toast viewport configuration. Controls position, maxVisible, and inset for toasts shown through useToast. |