← Images, shapes, layers, and flip cards

Shape overlay

luastra/ui · luastra/assets · luastra/motion
UI.Layer { base, overlay }

The first child defines shared bounds.

When to use it

Use a Layer when later children must occupy the same visual bounds as the first child, such as text or status content over a Shape.

Focused example

UI.Layer {
    id = "answer",
    UI.Shape {
        id = "answer/base",
        shape = "circle",
        width = 96,
        height = 96,
    },
    UI.Text {
        id = "answer/text",
        text = "Correct",
    },
}

Complete inventory

View all pages in Images, shapes, layers, and flip cards
← Previous: Admitted image