Elevation & glass

Flat surfaces, separated by fill. Glass is reserved for floating layers: menus, banners, the tab bar and, in the glass modes, sheets and controls. Never glass on glass.

Flat

Everything. No outline and no drop shadow anywhere: controls, cards, sheets, menus and the swipe handle separate by fill.

Fake glass

The default floating material and the one Flutter builds: translucent fill, background blur, 1px edge, a rim lit from the top. No drop shadow.

Glass

Figma's real glass (refraction, depth, light from the top). iOS-native only; on the web and in Flutter, use fake glass.

The fake-glass recipe in Flutter

Dart
class GlassPanel extends StatelessWidget {
  const GlassPanel({super.key, required this.child, this.radius = MoonshotRadius.popup, this.padding, this.height});
  final Widget child;
  final double radius;
  final EdgeInsets? padding;
  final double? height;

  @override
  Widget build(BuildContext context) {
    final c = Theme.of(context).extension<MoonshotColors>()!;
    final shape = BorderRadius.circular(radius);
    // flat: no BoxShadow. The panel separates by its blur, its fill and its rim.
    return ClipRRect(
      borderRadius: shape,
      child: BackdropFilter(
        filter: ImageFilter.blur(sigmaX: MoonshotBlur.menu, sigmaY: MoonshotBlur.menu),
        child: CustomPaint(
          foregroundPainter: _RimPainter(radius),          // top-lit rim, faint bottom lens highlight
          child: Container(
            height: height,
            padding: padding,
            decoration: BoxDecoration(color: c.bgMenu, borderRadius: shape,
              border: Border.all(color: c.lineMenuEdge)),
            child: child,
          ),
        ),
      ),
    );
  }
}

class _RimPainter extends CustomPainter {
  _RimPainter(this.radius);
  final double radius;
  @override
  void paint(Canvas canvas, Size size) {
    final rect = Offset.zero & size;
    final paint = Paint()
      ..style = PaintingStyle.stroke
      ..strokeWidth = 1
      ..shader = const LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter,
          colors: [Color(0x3DFFFFFF), Color(0x0DFFFFFF), Color(0x05FFFFFF), Color(0x17FFFFFF)],
          stops: [0, .3, .7, 1]).createShader(rect);
    canvas.drawRRect(RRect.fromRectAndRadius(rect.deflate(.5), Radius.circular(radius)), paint);
  }
  @override
  bool shouldRepaint(_RimPainter old) => old.radius != radius;
}
StyleBlur (Figma)Flutter sigmaDrop shadow
Menu, banner, tab bar6030none
Fake glass control2412none
Tooltip (slight glass: bg/menu, one line/menu-edge hairline, no rim)2412none
Fake glass sheet5628none
Swipe handle——none