Skip to content
Dark Search preview
Rendered from the SwiftUI source on this page.

Dark Search

From syxUI — written for both platforms, not translated between them.

A dark-mode search bar.

Inputs · SwiftUI · iOS 17

  • inputs
  • swiftui

The actual source

SearchBarDark.swift
// Dark Search · syxUI · https://syxui.dev/components/search-dark
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

struct SearchBarDark: View { var body: some View { HStack(spacing: 8) { Image(systemName: "magnifyingglass").font(.system(size: 15)).foregroundStyle(.white.opacity(0.6)); Text("Search").font(.system(size: 16)).foregroundStyle(.white.opacity(0.6)); Spacer() }.padding(.horizontal, 12).padding(.vertical, 11).frame(width: 300).background(Color(red: 0.22, green: 0.22, blue: 0.25), in: RoundedRectangle(cornerRadius: 12, style: .continuous)) } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17