ns-root-layout-overlays
Installation
SKILL.md
RootLayout overlays: open/close in the main window
Make the app root a RootLayout (it extends GridLayout) and any code can float views over the current page — no modal window, no navigation:
<!-- app-root.xml -->
<RootLayout>
<Frame defaultPage="main-page" />
</RootLayout>
import { Color, CoreTypes, getRootLayout, Label } from '@nativescript/core';
export async function showToast(message: string) {
const toast = new Label();
toast.text = message;
toast.verticalAlignment = CoreTypes.VerticalAlignment.bottom;
toast.marginBottom = 48;