Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Web and App implementation guide for Floating UI. Trigger when user wants detached cards, elevated components, and a light, airy feel.
.claude/skills/lingxling-floating-ui/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 109% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 87% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 158% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 244% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 58% | 0% |
> "Defying gravity. Elements that hover effortlessly above the surface."
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.
cssbody { background-color: var(--bg-primary); /* e.g., #F4F4F9 */ padding: 24px; /* Ensure nothing touches the edge */ } .floating-nav { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); background: white; border-radius: 50px; /* Pill shape */ padding: 12px 32px; /* Large, soft shadow */ box-shadow: 0 16px 40px rgba(0,0,0,0.08); display: flex; gap: 24px; } .floating-card { background: white; border-radius: 24px; padding: 32px; margin-bottom: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
swiftstruct FloatingUIView: View { var body: some View { ZStack { // Very light background Color(red: 0.95, green: 0.95, blue: 0.97).ignoresSafeArea() ScrollView { VStack(spacing: 24) { // Floating Content Card VStack(alignment: .leading, spacing: 12) { Text("Floating Card") .font(.title2).fontWeight(.bold) Text("This card hovers above the background, with massive soft shadows and completely rounded corners.") .foregroundColor(.secondary) } .padding(32) .frame(maxWidth: .infinity, alignment: .leading) .background(Color.white) .cornerRadius(32) // Very large radius // Large, highly blurred shadow .shadow(color: Color.black.opacity(0.05), radius: 30, x: 0, y: 15) .padding(.horizontal, 24) // Keeps it detached from edges } .padding(.top, 40) } // Floating Pill Navigation VStack { Spacer() HStack(spacing: 40) { Image(systemName: "house.fill").foregroundColor(.blue) Image(systemName: "magnifyingglass").foregroundColor(.gray) Image(systemName: "bell.fill").foregroundColor(.gray) Image(systemName: "person.fill").foregroundColor(.gray) } .padding(.vertical, 16) .padding(.horizontal, 32) .background(Color.white) .clipShape(Capsule()) // Pill shape .shadow(color: Color.black.opacity(0.1), radius: 25, x: 0, y: 10) .padding(.bottom, 32) // Detached from bottom edge } } } }
.clipShape(Capsule()) with a massive .shadow() creates the perfect floating pill navigation bar..shadow(radius: ...) up to 25 or 30 with a very low opacity (0.05) to get the soft, diffuse hover effect.dartclass FloatingUIScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: const Color(0xFFF4F4F9), body: Stack( children: [ ListView( padding: const EdgeInsets.all(24), children: [ // Floating Content Card Container( margin: const EdgeInsets.only(bottom: 24), padding: const EdgeInsets.all(32), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(32), // Large radius boxShadow: [ BoxShadow( color: Colors.black.withOpacity(0.05), blurRadius: 30, offset: const Offset(0, 15), ) ], ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: const [ Text('Floating Card', style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)), SizedBox(height: 12), Text('This card hovers above the background.', style: TextStyle(color: Colors.grey)), ], ), ), ], ), // Floating Bottom Nav Align( alignment: Alignment.bottomCenter, child: Container( margin: const EdgeInsets.only(bottom: 32), padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(50), // Pill shape boxShadow: [ BoxShadow(color: Colors.black.withOpacity(0.1), blurRadius: 25, offset: const Offset(0, 10)) ], ), child: Row( mainAxisSize: MainAxisSize.min, // Wrap content children: const [ Icon(Icons.home, color: Colors.blue), SizedBox(width: 40), Icon(Icons.search, color: Colors.grey), SizedBox(width: 40), Icon(Icons.person, color: Colors.grey), ], ), ), ), ], ), ); } }
BottomNavigationBar. Instead, use a Stack and Align(alignment: Alignment.bottomCenter) with a Container to build the floating pill menu.blurRadius: 30 in BoxShadow for the diffuse look.jsxconst FloatingUIScreen = () => { return ( <View style={{ flex: 1, backgroundColor: '#F4F4F9' }}> <ScrollView contentContainerStyle={{ padding: 24 }}> {/* Floating Card */} <View style={styles.floatingCard}> <Text style={{ fontSize: 24, fontWeight: 'bold', marginBottom: 12 }}>Floating Card</Text> <Text style={{ color: '#666' }}>This card hovers above the background, detached from all edges.</Text> </View> </ScrollView> {/* Floating Pill Nav */} <View style={styles.floatingNav}> <Text style={{ fontSize: 20 }}>🏠</Text> <Text style={{ fontSize: 20, opacity: 0.5 }}>🔍</Text> <Text style={{ fontSize: 20, opacity: 0.5 }}>👤</Text> </View> </View> ); }; const styles = StyleSheet.create({ floatingCard: { backgroundColor: '#FFF', borderRadius: 32, padding: 32, marginBottom: 24, // iOS shadow shadowColor: '#000', shadowOffset: { width: 0, height: 15 }, shadowOpacity: 0.05, shadowRadius: 30, // Android shadow elevation: 8, }, floatingNav: { position: 'absolute', bottom: 40, alignSelf: 'center', flexDirection: 'row', backgroundColor: '#FFF', borderRadius: 50, paddingVertical: 16, paddingHorizontal: 32, gap: 40, // Needs RN 0.71+ shadowColor: '#000', shadowOffset: { width: 0, height: 10 }, shadowOpacity: 0.1, shadowRadius: 25, elevation: 10, } });
position: 'absolute' with alignSelf: 'center' is the easiest way to place the pill nav in React Native.elevation doesn't support massive blur radii very well, so the effect is stronger and softer on iOS.kotlin@Composable fun FloatingUIScreen() { Box(modifier = Modifier.fillMaxSize().background(Color(0xFFF4F4F9))) { Column( modifier = Modifier .fillMaxSize() .padding(24.dp) ) { // Floating Card Box( modifier = Modifier .fillMaxWidth() .shadow(15.dp, RoundedCornerShape(32.dp), spotColor = Color.Black.copy(alpha = 0.05f)) .background(Color.White, RoundedCornerShape(32.dp)) .padding(32.dp) ) { Column { Text("Floating Card", fontSize = 24.sp, fontWeight = FontWeight.Bold) Spacer(Modifier.height(12.dp)) Text("This card hovers above the background.", color = Color.Gray) } } } // Floating Pill Nav Row( modifier = Modifier .align(Alignment.BottomCenter) .padding(bottom = 32.dp) .shadow(20.dp, CircleShape, spotColor = Color.Black.copy(alpha = 0.1f)) .background(Color.White, CircleShape) .padding(horizontal = 32.dp, vertical = 16.dp), horizontalArrangement = Arrangement.spacedBy(40.dp) ) { Icon(Icons.Default.Home, contentDescription = null, tint = Color.Blue) Icon(Icons.Default.Search, contentDescription = null, tint = Color.Gray) Icon(Icons.Default.Person, contentDescription = null, tint = Color.Gray) } } }
CircleShape for the pill nav background.alpha of the spotColor in Modifier.shadow to achieve the soft, diffuse shadow look, otherwise Compose defaults to a harsh, dark shadow.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 9,712 | 10,013 | +3% | 1 | 1 | 0% | 1,939 | 4,053 | +109% | 0 | 0 | — |
case-02 | fail→pass | 15,759 | 9,243 | -41% | 1 | 1 | 0% | 2,480 | 4,644 | +87% | 0 | 0 | — |
case-03 | fail→pass | 14,130 | 17,886 | +27% | 1 | 1 | 0% | 2,218 | 5,712 | +158% | 0 | 0 | — |
case-04 | fail→pass | 7,796 | 8,210 | +5% | 1 | 1 | 0% | 1,183 | 4,069 | +244% | 0 | 0 | — |
case-05 | fail→pass | 18,735 | 11,291 | -40% | 1 | 1 | 0% | 2,860 | 4,513 | +58% | 0 | 0 | — |
case-06 | pass→pass | 22,918 | 9,811 | -57% | 1 | 1 | 0% | 1,982 | 4,129 | +108% | 0 | 0 | — |
case-07 | fail→fail | 13,400 | 8,462 | -37% | 1 | 1 | 0% | 1,912 | 4,291 | +124% | 0 | 0 | — |
case-08 | fail→pass | 11,973 | 6,257 | -48% | 1 | 1 | 0% | 1,830 | 3,995 | +118% | 0 | 0 | — |
case-09 | pass→pass | 11,315 | 6,540 | -42% | 1 | 1 | 0% | 2,001 | 3,890 | +94% | 0 | 0 | — |
case-10 | fail→pass | 10,175 | 8,374 | -18% | 1 | 1 | 0% | 1,832 | 4,051 | +121% | 0 | 0 | — |
case-11 | fail→pass | 15,356 | 7,754 | -50% | 1 | 1 | 0% | 2,293 | 4,449 | +94% | 0 | 0 | — |
case-12 | pass→pass | 13,909 | 7,925 | -43% | 1 | 1 | 0% | 2,315 | 4,042 | +75% | 0 | 0 | — |
case-13 | fail→pass | 14,846 | 14,932 | +1% | 1 | 1 | 0% | 2,831 | 5,426 | +92% | 0 | 0 | — |
case-14 | fail→pass | 8,373 | 5,036 | -40% | 1 | 1 | 0% | 1,196 | 3,483 | +191% | 0 | 0 | — |
case-15 | fail→pass | 16,456 | 12,428 | -24% | 1 | 1 | 0% | 2,555 | 5,229 | +105% | 0 | 0 | — |
case-16 | fail→pass | 17,528 | 9,622 | -45% | 1 | 1 | 0% | 2,616 | 4,189 | +60% | 0 | 0 | — |
case-17 | fail→pass | 12,902 | 11,619 | -10% | 1 | 1 | 0% | 2,544 | 4,676 | +84% | 0 | 0 | — |
case-18 | fail→pass | 12,760 | 17,343 | +36% | 1 | 1 | 0% | 2,187 | 5,512 | +152% | 0 | 0 | — |
case-19 | pass→pass | 11,964 | 8,947 | -25% | 1 | 1 | 0% | 1,868 | 4,561 | +144% | 0 | 0 | — |
case-20 | pass→pass | 15,981 | 19,804 | +24% | 1 | 1 | 0% | 2,949 | 6,313 | +114% | 0 | 0 | — |
case-21 | pass→fail | 32,168 | 21,952 | -32% | 1 | 1 | 0% | 5,339 | 7,319 | +37% | 0 | 0 | — |
case-22 | pass→pass | 12,803 | 5,073 | -60% | 1 | 1 | 0% | 2,246 | 3,591 | +60% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +59 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.