Install with shadcn
Experimental compatibility. This installs the real Astryx package and creates a local public re-export; it does not copy component implementation source. How compatibility works.
This install URL expires with the draft preview.bashnpx shadcn@latest add https://astryx-2z5i6c2u1-fbopensource.vercel.app/r/astryx-component-layer-provider.json
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. |