Skip to content

AppSheet

AppSheet is a bottom sheet in the style of iOS. A panel slides up from the bottom edge over a scrim, with a grabber at the top.

Usage

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

C.AppSheet(scope, {
    Layer = overlayLayer,
    Open = open,
    Title = "Share",
    Children = { C.Text(scope, { Text = "Choose how to share." }) },
    OnClose = function()
        open:set(false)
    end,
})

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.
Visible UsedAs<boolean> ❌ true Whether the component is shown.
ZIndex UsedAs<number> ❌ - Z index of the component.
Open UsedAs<boolean> ❌ - Whether the sheet is shown. Follows the state you pass.
Title UsedAs<string> ❌ - Title at the top of the sheet.
Children any ❌ - Content of the sheet.
Detent number ❌ 0.92 Height of the sheet as a fraction, from 0 to 1, of the layer it is mounted on.
ShowGrabber boolean ❌ true Show the small handle at the top.

Callbacks

Name Description
OnClose: () -> () Runs when the user presses the scrim.

See also