Skill

Generate Spatial Computing UI with 3D Glass Effects

Design-style skill for Spatial Computing UI: real Z-depth glass windows floating in AR, with visionOS-style gaze interaction cues.

Works with swiftuiflutterreact nativevisionos

Maintainer of this project? Claim this page to edit the listing.


81
Spark score
out of 100
Updated 28 days ago
Version 13.5.0

Add to Favorites

Why it matters

Design and implement spatial computing interfaces with authentic 3D depth, frosted glass materials, and gaze-based interactions for augmented reality and immersive applications across web and native platforms.

Outcomes

What it gets done

01

Create floating 3D windows with true z-space hierarchy using CSS transforms or native materials

02

Implement frosted glass effects with backdrop blur, translucency, and specular highlights

03

Build gaze-reactive UI elements that respond to hover and eye-tracking interactions

04

Generate platform-specific code for SwiftUI/visionOS, Flutter, React Native, and web

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-spatial-computing-ui | bash

Overview

Spatial Computing UI

A design-style skill for Spatial Computing UI - real Z-depth glass windows floating in an AR environment with gaze-anticipating interaction cues - with matching Web CSS 3D and SwiftUI/visionOS implementations. Use it for visionOS-style apps, AR concept interfaces, or spatial-computing product demos that need genuine depth and floating windows rather than a flat screen metaphor.

What it does

Spatial Computing UI is a design-style child skill ('a step beyond Spatial Design - fully 3D windows floating in augmented reality'), part of the design-it family and not meant to be triggered directly. Three core principles: Z-Space Hierarchy (not just drop shadows but actual 3D distance - modals float genuinely in front of the main window, not just visually layered), Gaze-Based Interaction Cues (elements highlight vividly on hover, anticipating eye-tracking or precise pointer control rather than a mouse-only interaction model), and Glass and Light (windows are thick sheets of frosted glass that bend light and cast soft shadows onto the physical environment behind them).

When to use - and when NOT to

Use it when the user's request matches this AR/mixed-reality windowing aesthetic - visionOS-style apps, AR concept interfaces, or any UI meant to feel like it's physically floating in a real room rather than flat on a screen. As a design sub-style, it's selected by the parent design-it skill's routing rather than invoked on its own.

Inputs and outputs

Visual DNA relies entirely on the background environment showing through - purely translucent whites and blacks (rgba(255,255,255,0.x)), never opaque solid colors - SF Pro with heavy use of varied weights for hierarchy, and very high border radii (24-32px) so everything reads as a rounded rectangle or perfect circle rather than a sharp screen-native window. The web implementation is best emulated with CSS 3D transforms: a room-photo background with perspective: 1200px, a main "spatial window" using heavy backdrop-filter: blur(50px) saturate(200%) glass plus an inset highlight and large soft outer shadow, positioned with translateZ(-100px) to sit slightly back in depth, while a modal genuinely floats in front via translateZ(50px) with a more opaque glass fill. Buttons get gaze/hover feedback that both brightens the fill and lifts the element forward in Z-space (transform: translateZ(10px) scale(1.05)) using a smooth spatial-feeling cubic-bezier easing.

.spatial-window {
  backdrop-filter: blur(50px) saturate(200%);
  transform: translateZ(-100px);
}
.spatial-modal { transform: translate(-50%, -50%) translateZ(50px); }
.spatial-btn:hover { transform: translateZ(10px) scale(1.05); }

Integrations

The SwiftUI/visionOS implementation composes a simulated room-environment background image behind the glass windows, matching the web's photo-backdrop approach for a native AR-adjacent context - the same glass-and-depth vocabulary applies whether targeting real visionOS or emulating the look on iOS.

Who it's for

Designers and developers building visionOS-style apps, AR concept interfaces, or spatial-computing product demos that need windows to feel like they're physically floating and layered in a real room, with genuine depth and gaze-anticipating interaction rather than a flat screen metaphor.

Source README

Spatial Computing UI

"A step beyond Spatial Design. Fully 3D windows floating in augmented reality."

When to Use

Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the design-it skill and is not meant to be triggered directly.

Core Principles

  1. Z-Space Hierarchy: Not just drop shadows, but actual 3D distance. Modals float 10px in front of the main window.
  2. Gaze-Based Interaction Cues: Elements highlight vividly when hovered, anticipating eye-tracking or precise pointer control.
  3. Glass and Light: Windows are thick sheets of frosted glass that bend light and cast soft shadows onto the physical environment.

Visual DNA

  • Colors: Relies entirely on the background environment. Uses purely translucent whites (rgba(255,255,255,0.x)) and blacks.
  • Typography: SF Pro. Heavy use of varied font weights (Regular, Semibold, Bold) to create hierarchy.
  • Shapes: High border radii (24px-32px). Everything is a rounded rectangle or a perfect circle.

Web Implementation

  • Best emulated using CSS 3D transforms to simulate the user's perspective.
  • CSS Example:
body {
  /* Simulate the physical room */
  background: url('living-room.jpg') center/cover;
  perspective: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.spatial-window {
  width: 800px;
  height: 600px;
  border-radius: 32px;
  
  /* The Glass Material */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  
  /* Specular Highlights */
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.8),
    0 30px 60px rgba(0, 0, 0, 0.3);
    
  /* 3D Positioning */
  transform: translateZ(-100px);
  transform-style: preserve-3d;
}

.spatial-modal {
  /* Floating in front of the main window */
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) translateZ(50px);
  
  background: rgba(255, 255, 255, 0.6); /* More opaque */
  backdrop-filter: blur(30px);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.spatial-btn {
  /* Gaze/Hover interaction */
  background: rgba(0,0,0,0.05);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.spatial-btn:hover {
  background: rgba(255,255,255,0.4);
  transform: translateZ(10px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

App Implementation

SwiftUI (visionOS Native / iOS emulation)

struct SpatialComputingView: View {
    var body: some View {
        ZStack {
            // Simulated room environment
            Image("living-room")
                .resizable()
                .aspectRatio(contentMode: .fill)
                .ignoresSafeArea()
            
            // Spatial Window
            VStack(spacing: 24) {
                Text("Spatial Window")
                    .font(.title).fontWeight(.bold)
                    .foregroundColor(.white)
                
                // Gaze-reactive button
                Button(action: {}) {
                    Text("Focus Me")
                        .fontWeight(.semibold)
                        .foregroundColor(.white)
                        .padding(.horizontal, 32)
                        .padding(.vertical, 16)
                        // .hoverEffect() is magic on visionOS/iPadOS
                        // .hoverEffect(.highlight)
                }
                .background(Color.black.opacity(0.2))
                .clipShape(Capsule())
            }
            .padding(60)
            // The magic glass material
            .background(.ultraThinMaterial)
            .cornerRadius(32)
            // Specular edge highlight
            .overlay(
                RoundedRectangle(cornerRadius: 32)
                    .stroke(Color.white.opacity(0.4), lineWidth: 1)
            )
            // Environmental shadow
            .shadow(color: .black.opacity(0.3), radius: 40, y: 30)
            
            // Z-Space Modal simulation (if on iOS)
            // On visionOS, this would be a separate window volume
            Text("Floating Modal")
                .foregroundColor(.white)
                .padding(30)
                .background(.thinMaterial)
                .cornerRadius(24)
                .shadow(color: .black.opacity(0.4), radius: 30, y: 20)
                .offset(x: 100, y: 100)
        }
    }
}
  • Use .ultraThinMaterial for the base windows and .thinMaterial for floating popovers so they feel more opaque as they get closer to the eye.
  • Use .hoverEffect() extensively if targeting iPadOS or visionOS.

Flutter

import 'dart:ui';

class SpatialComputingScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        fit: StackFit.expand,
        children: [
          // Simulated Environment
          Image.asset('assets/living-room.jpg', fit: BoxFit.cover),
          
          Center(
            child: ClipRRect(
              borderRadius: BorderRadius.circular(32),
              child: BackdropFilter(
                filter: ImageFilter.blur(sigmaX: 40.0, sigmaY: 40.0), // Heavy blur
                child: Container(
                  width: 600, height: 400,
                  decoration: BoxDecoration(
                    color: Colors.white.withOpacity(0.15), // Glass tint
                    borderRadius: BorderRadius.circular(32),
                    border: Border.all(color: Colors.white.withOpacity(0.4), width: 1), // Specular highlight
                    // Note: BoxShadow won't render under BackdropFilter nicely unless wrapped in a separate PhysicalModel
                  ),
                  child: Center(
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        const Text('Spatial Window', style: TextStyle(color: Colors.white, fontSize: 32, fontWeight: FontWeight.bold)),
                        const SizedBox(height: 32),
                        // Simulated Gaze Button
                        InkWell(
                          onTap: () {},
                          borderRadius: BorderRadius.circular(50),
                          hoverColor: Colors.white.withOpacity(0.4), // Reacts to mouse/gaze
                          child: Container(
                            padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16),
                            decoration: BoxDecoration(color: Colors.black.withOpacity(0.2), borderRadius: BorderRadius.circular(50)),
                            child: const Text('Focus Me', style: TextStyle(color: Colors.white, fontSize: 18)),
                          ),
                        )
                      ],
                    ),
                  ),
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
  • You must wrap BackdropFilter inside a ClipRRect to give the blurred glass rounded corners.
  • hoverColor on InkWell simulates the gaze-highlighting.

React Native

// REQUIRES: @react-native-community/blur
import { BlurView } from '@react-native-community/blur';

const SpatialComputingScreen = () => {
  return (
    <ImageBackground source={{uri: 'room_bg'}} style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      
      {/* Spatial Window */}
      <View style={{
        width: '90%', height: 400,
        shadowColor: '#000', shadowOffset: { width: 0, height: 30 },
        shadowOpacity: 0.3, shadowRadius: 40, elevation: 20
      }}>
        <BlurView
          style={{ flex: 1, borderRadius: 32, borderWidth: 1, borderColor: 'rgba(255,255,255,0.4)', padding: 40, justifyContent: 'center', alignItems: 'center' }}
          blurType="light"
          blurAmount={30}
          reducedTransparencyFallbackColor="gray"
        >
          <Text style={{ color: '#FFF', fontSize: 32, fontWeight: 'bold', marginBottom: 32 }}>
            Spatial Window
          </Text>

          {/* Touchable simulating Gaze */}
          <TouchableOpacity style={{
            backgroundColor: 'rgba(0,0,0,0.2)', paddingVertical: 16, paddingHorizontal: 32, borderRadius: 50
          }}>
            <Text style={{ color: '#FFF', fontSize: 18, fontWeight: '600' }}>Focus Me</Text>
          </TouchableOpacity>
        </BlurView>
      </View>

    </ImageBackground>
  );
};
  • React Native's core cannot do background blur. You must install @react-native-community/blur.
  • Apply shadows to a wrapper View, and put the BlurView inside it with borderRadius and borderWidth.

Jetpack Compose

@Composable
fun SpatialComputingScreen() {
    Box(modifier = Modifier.fillMaxSize()) {
        // Environment
        Image(painterResource(R.drawable.living_room), contentDescription = null, contentScale = ContentScale.Crop, modifier = Modifier.fillMaxSize())
        
        // Spatial Window
        Box(
            modifier = Modifier
                .align(Alignment.Center)
                .size(600.dp, 400.dp)
                // Note: Native Android background blur requires Android 12+ (RenderEffect)
                .graphicsLayer {
                    renderEffect = RenderEffect.createBlurEffect(40f, 40f, Shader.TileMode.DECAL).asComposeRenderEffect()
                    clip = true
                    shape = RoundedCornerShape(32.dp)
                }
                .background(Color.White.copy(alpha = 0.15f))
                .border(1.dp, Color.White.copy(alpha = 0.4f), RoundedCornerShape(32.dp))
                .padding(40.dp),
            contentAlignment = Alignment.Center
        ) {
            Column(horizontalAlignment = Alignment.CenterHorizontally) {
                Text("Spatial Window", color = Color.White, fontSize = 32.sp, fontWeight = FontWeight.Bold)
                Spacer(Modifier.height(32.dp))
                
                // Button
                Box(
                    modifier = Modifier
                        .background(Color.Black.copy(alpha = 0.2f), CircleShape)
                        .clickable { }
                        .padding(horizontal = 32.dp, vertical = 16.dp)
                ) {
                    Text("Focus Me", color = Color.White, fontSize = 18.sp, fontWeight = FontWeight.SemiBold)
                }
            }
        }
    }
}
  • On Android 12+, use RenderEffect.createBlurEffect applied to the graphicsLayer to blur the UI behind the compose element.
  • The border modifier applies the bright specular rim-light crucial to glass effects.

Do's and Don'ts

  • DO: Create a distinct visual pop (size increase and shadow depth increase) on hover/focus to simulate the gaze-tracking interaction of Spatial Computing.
  • DON'T: Use flat, opaque colors for the main windows. They must be glass.

Limitations

  • This is a styling reference and does not replace environment-specific validation, accessibility testing, or expert review.
  • Ensure appropriate contrast ratios and responsive behaviors are verified separately.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.