A beautiful Flutter application showcasing modern liquid glass UI components with stunning visual effects and smooth animations. This project demonstrates how to create elegant glassmorphism interfaces using the liquid_glass_renderer package, inspired by iOS liquid glass design.
This project draws inspiration from Apple's signature liquid glass aesthetic found in iOS interfaces, featuring:
- Translucent glass effects similar to iOS Control Center and Notification Center
- Smooth blur and transparency matching iOS design principles
- Subtle light reflections that mimic iOS glass surfaces
- Elegant animations inspired by iOS fluid interactions
- Modern glassmorphism that feels native to Apple's design ecosystem
- Liquid Glass Navigation Bar - Animated bottom navigation with glass effects
- Interactive Glass Buttons - Press animations with hover and focus states
- Glass Panels & Cards - Various glass UI components for content display
- Blended Glass Groups - Layered glass effects for grouped elements
- Responsive Design - Works across different screen sizes
- Smooth Animations - Fluid transitions and micro-interactions
The app includes four main screens:
- Home - Welcome panel with glass tiles for different categories
- Search - Search bar with filter chips
- Likes - Favorites display with glass cards
- Profile - User profile with settings panels
lib/
βββ main.dart # App entry point
βββ screens/
β βββ glass_nav_demo_screen.dart # Main demo screen with navigation
βββ widgets/
βββ blended_glass_button_group.dart # Glass button group container
βββ buttons/
β βββ liquid_glass_button.dart # Main glass button component
βββ glass/
βββ glass_panel.dart # Glass panel container
βββ glass_square_card.dart # Square glass card
βββ glass_tile.dart # Small glass tile
A highly customizable glass button with:
- Press animations and scaling effects
- Hover and focus states
- Loading and disabled states
- Customizable glass settings
- Border support
- Foreground color customization
LiquidGlassButton(
onPressed: () => print('Pressed!'),
borderRadius: 28,
settings: LiquidGlassSettings(
thickness: 12,
blur: 8,
glassColor: Color(0x22FFFFFF),
),
child: Text('Glass Button'),
)A container that groups multiple glass buttons with shared glass effects:
- Automatic spacing and alignment
- Layered glass rendering
- Customizable blend settings
- Responsive layout
A versatile glass container for content:
- Customizable dimensions
- Rounded corners
- Glass effect settings
- Child content support
Specialized glass components for displaying content:
- Pre-configured sizes and styles
- Icon and text support
- Consistent glass effects
- liquid_glass_renderer: ^0.1.1-dev.10 - Core glass rendering engine
- iconsax_plus: ^1.0.0 - Modern icon set
- flutter: Latest stable version
-
Clone the repository
git clone <repository-url> cd liquid_glass_button
-
Install dependencies
flutter pub get
-
Run the app
flutter run
LiquidGlassButton(
onPressed: () => handlePress(),
borderRadius: 22,
settings: LiquidGlassSettings(
thickness: 16,
blur: 8,
glassColor: Color(0x33FFFFFF),
),
child: Row(
children: [
Icon(Icons.home, size: 18),
SizedBox(width: 6),
Text('Home'),
],
),
)GlassPanel(
height: 180,
borderRadius: 28,
settings: LiquidGlassSettings(
thickness: 14,
blur: 8,
glassColor: Color(0x33FFFFFF),
),
child: Padding(
padding: EdgeInsets.all(20),
child: Text('Glass Panel Content'),
),
)BlendedGlassButtonGroup(
settings: LiquidGlassSettings(
thickness: 12,
blur: 6,
glassColor: Color(0x22FFFFFF),
blend: 48,
),
children: [
LiquidGlassButton(onPressed: () {}, child: Text('Button 1')),
LiquidGlassButton(onPressed: () {}, child: Text('Button 2')),
],
)The LiquidGlassSettings class allows you to customize glass effects that mimic iOS design:
- thickness: Glass effect thickness (similar to iOS blur intensity)
- blur: Blur intensity matching iOS system blur
- glassColor: Glass color with alpha (iOS-style transparency)
- lightIntensity: Light reflection intensity (iOS ambient light)
- blend: Blend mode intensity (iOS layer blending)
- saturation: Color saturation (iOS color accuracy)
- lightness: Color lightness (iOS brightness control)
Buttons automatically handle:
- Normal: Default glass appearance
- Hover: Enhanced light intensity
- Focus: Keyboard navigation support
- Pressed: Scale animation and enhanced effects
- Disabled: Reduced opacity and effects
- Loading: Loading spinner display
- Create a new widget in the appropriate directory
- Use
LiquidGlassorLiquidGlass.inLayerfor glass effects - Configure
LiquidGlassSettingsfor desired appearance - Add to the demo screen for testing
- Use consistent border radius values (16, 20, 22, 28) matching iOS design system
- Maintain glass color consistency (0x22FFFFFF, 0x33FFFFFF) for iOS-style transparency
- Apply appropriate spacing (12px, 16px, 20px) following iOS Human Interface Guidelines
- Use white text/icons for dark backgrounds (iOS dark mode support)
- Implement subtle shadows and highlights for depth (iOS depth perception)
- Use smooth easing curves (Curves.easeOut) for iOS-like animations
This project is open source and available under the [MIT License].
Contributions are welcome! Please feel free to submit a Pull Request.
Built by Yazdan Haider using Flutter and Liquid Glass Renderer, inspired by iOS design language