Skip to content
Dimmed Spotlight preview
Rendered from the SwiftUI source on this page.

Dimmed Spotlight

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

A dimmed overlay with a highlighted target.

Feedback · SwiftUI · iOS 17

  • feedback
  • swiftui

The actual source

SpotlightDim.swift
// Dimmed Spotlight · syxUI · https://syxui.dev/components/tip-spotlight-dim
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

struct SpotlightDim: View { var body: some View { ZStack { RoundedRectangle(cornerRadius: 20).fill(Color.black.opacity(0.55)).frame(width: 260, height: 180); Circle().stroke(.white, lineWidth: 3).frame(width: 70, height: 70).overlay(Image(systemName: "plus").font(.system(size: 24, weight: .semibold)).foregroundStyle(.white)).offset(y: -30); Text("Tap here to create").font(.system(size: 14, weight: .medium)).foregroundStyle(.white).offset(y: 40) }.clipShape(RoundedRectangle(cornerRadius: 20, style: .continuous)) } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17