Skip to content

Shadow ​

Adds a drop shadow to a widget.

luau
PeanutUI.Frame {
    shadow = {
        blurRadius = PeanutUI.Unit(16),
        offset = PeanutUI.Position(0, 4),
        transparency = 0.6,
    }
}

Use shadows to attach multiple shadows:

luau
PeanutUI.Frame {
    shadows = {
        { blurRadius = PeanutUI.Unit(16), offset = PeanutUI.Position(0, 0), transparency = 0.6 },
        { blurRadius = PeanutUI.Unit(24), offset = PeanutUI.Position(0, 4), transparency = 0.7 },
    }
}

Properties ​

PropertyTypeDescription
enabledbooleanWhether the shadow is drawn.
blurRadiusUnitBlur radius.
colorColor3Shadow color.
offsetPositionShadow offset.
spreadSizeShadow spread.
transparencynumberShadow transparency.
zIndexnumberDraw order.