Skip to content

MenuPage

MenuPage is a named page inside a Menu. Pages slide when the user moves between them. A page with a Title gets a back control.

Usage

Call Components.MenuPage with a scope and a table of properties:

C.Menu(scope, {
    Layer = overlayLayer,
    Children = {
        C.MenuPage(scope, { Id = "root", Children = {
            C.MenuButton(scope, { Text = "Language", Page = "language" }),
        } }),
        C.MenuPage(scope, { Id = "language", Title = "Language", Children = {
            C.MenuButton(scope, { Text = "English" }),
        } }),
    },
})

Properties

Name Type Required Default Description
Theme ThemeRef ❌ The contextual theme Theme to use for this component instead of the one from Theme.Provide.
LayoutOrder UsedAs<number> ❌ 0 Position in a parent UIListLayout or UIGridLayout.
Size UsedAs<UDim2> ❌ - Size of the component.
Visible UsedAs<boolean> ❌ true Whether the component is shown.
ZIndex UsedAs<number> ❌ - Z index of the component.
Id string ✅ - Name of the page. A MenuButton opens the page by this name.
Title UsedAs<string> ❌ - Title of the bar at the top of the page. A page with a title also gets a back control.
Children any ❌ - Content of the page.

See also