Skip to Content
Kinemium

UIShadow

Draw a soft drop shadow behind a GUI element.

UIShadow is a UI modifier that draws a blurred shadow behind its parent. Blur, offset, spread, color, transparency, and falloff are all configurable.

Getting started

local shadow = Instance.new("UIShadow")
shadow.BlurRadius = UDim.new(0, 16)
shadow.Offset = UDim2.fromOffset(0, 6)
shadow.Transparency = 0.4
shadow.Parent = frame

Properties

PropertyTypeAccessDefaultDescription
EnabledbooleanRead/writetrueWhether the shadow renders.
BlurRadiusUDimRead/writeUDim.new(0, 12)Blur amount.
OffsetUDim2Read/writeUDim2.fromOffset(0, 4)Shadow displacement.
SpreadUDim2Read/writeUDim2.new()Extra size around the parent.
Color3Color3Read/writeBlackShadow color.
TransparencynumberRead/write0.35Shadow transparency, clamped to 0 through 1.
ExponentnumberRead/write2Falloff curve, minimum 1.
ZIndexnumberRead/write0Draw order of the shadow.
ShowForTextbooleanRead/writefalseAlso draw a shadow for text.

Notes

  • Exponent values below 1 are raised to 1.
  • Transparency clamps instead of raising.
  • The modifier applies to its parent GUI object.
  • Cloning copies every shadow setting.

See also

  • UIStroke for an outline instead of a shadow.
  • UIBackdrop for blurring what's behind the element.

On this page