liqkit_ui
Foundation

Glass Surface

LiqGlassSurface is the canonical iOS 26 Liquid Glass material — the single primitive every glass-bearing component in liqkit_ui consumes to draw a translucent panel. It paints, in order, a backdrop blur, a tint-specific uniform material fill, and a 0.5pt hairline rim. Sheets, popovers, dialogs, toolbars, action sheets, drawers, and hover cards all reduce to a single call to this widget — instead of hand-rolling colors and shadows.

The widget exposes two enums as the public knobs: LiqGlassTint (light, dark, opaque) drives the base fill and rim, and LiqGlassElevation (flat, floating, modal) drives the outer drop shadow.

Floating

// ignore_for_file: file_names // hyphenated name required by snippet manifest conventionimport 'package:docs_snippets/src/snippet_frame.dart';import 'package:flutter/widgets.dart';import 'package:liqkit_ui/liqkit_ui.dart';/// Snippet builder consumed by `apps/docs_snippets/lib/src/routes.g.dart`.Widget glassSurfaceFloatingBuilder(BuildContext context) {  return const SnippetFrame(    maxWidth: 400,    height: 200,    surface: SnippetFrameSurface.liquidThemed,    surfacePadding: EdgeInsets.all(24),    child: LiqGlassSurface(      padding: EdgeInsets.all(24),      child: SizedBox(        width: 240,        child: SnippetLabel(          'Liquid Glass — translucent surface with backdrop blur, '          'a uniform material tint, and a hairline rim.',          fontSize: 14,        ),      ),    ),  );}

Flat

// ignore_for_file: file_names // hyphenated name required by snippet manifest conventionimport 'package:docs_snippets/src/snippet_frame.dart';import 'package:flutter/widgets.dart';import 'package:liqkit_ui/liqkit_ui.dart';/// Snippet builder consumed by `apps/docs_snippets/lib/src/routes.g.dart`.Widget glassSurfaceFlatBuilder(BuildContext context) {  return const SnippetFrame(    maxWidth: 400,    height: 200,    surface: SnippetFrameSurface.liquidThemed,    surfacePadding: EdgeInsets.all(24),    child: LiqGlassSurface(      elevation: LiqGlassElevation.flat,      padding: EdgeInsets.all(24),      child: SizedBox(        width: 240,        child: SnippetLabel(          'Flat elevation — sits inline on its parent with no '          'outer drop shadow. Use for sidebars, inline panels, '          'and grouped settings rows.',          fontSize: 14,        ),      ),    ),  );}

Dark

// ignore_for_file: file_names // hyphenated name required by snippet manifest conventionimport 'package:docs_snippets/src/snippet_frame.dart';import 'package:flutter/widgets.dart';import 'package:liqkit_ui/liqkit_ui.dart';/// Snippet builder consumed by `apps/docs_snippets/lib/src/routes.g.dart`.Widget glassSurfaceDarkBuilder(BuildContext context) {  return const SnippetFrame(    maxWidth: 400,    height: 200,    surface: SnippetFrameSurface.liquidDark,    surfacePadding: EdgeInsets.all(24),    child: LiqGlassSurface(      tint: LiqGlassTint.dark,      padding: EdgeInsets.all(24),      child: SizedBox(        width: 240,        child: SnippetLabel(          'Dark Liquid Glass — used by action sheets in dark mode, '          'the dark status bar, and other surfaces overlaid on '          'dark content.',          fontSize: 14,        ),      ),    ),  );}

On this page