swiftui-forms
БесплатноБез исполняемых скриптовНе проверенBuild macOS 26+ SwiftUI forms using Liquid Glass design language. Use when creating preferences panes, inspectors, configuration screens, or settings views in…
от ArjenSchwarz★ 20 звёзд на GitHubОб этом скилле
Liquid Glass Forms (macOS 26+)
Two-Layer Architecture
- Glass layer: toolbars, sidebars, inspector shells, section containers (structural)
- Content layer: form rows and fields (solid/neutral)
Glass is for the navigation/control layer floating above content, not a blanket background for every input.
Glass Modifier Usage
On macOS 26, there is ONE glass modifier: glassEffect(_:in:).
- Section containers: Apply as a
.background {}on aRoundedRectangle - Special tiles/callouts: Apply in a
ZStackon a shape (rare)
⚠️ glassBackgroundEffect(displayMode:) is visionOS-only — it does NOT compile on macOS.
Default Layout Pattern
Use Grid + FormRow with a labelWidth sized to the longest label. Only fall back to Form for trivial System Settings-style preference lists.
struct MacConfigView: View {
// Size to longest label. ~90 for short labels like "Name", "Email".
// Scale up only for genuinely long labels like "Notification Frequency".
private let labelWidth: CGFloat = 90
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 28) {
LiquidGlassSection(title: "General") {
Grid(alignment: .leadingFirstTextBaseline,
horizontalSpacing: 16, verticalSpacing: 14) {
FormRow("Name", labelWidth: labelWidth) {
TextField("", text: $name)
}
FormRow("Role", labelWidth: labelWidth) {
Picker("", selection: $role) {
ForEach(Role.allCases, id: \.self) { r in
Text(r.displayName).tag(r)
}
}
.labelsHidden()
.pickerStyle(.menu)
.fixedSize()
}
FormRow("Sync", labelWidth: labelWidth) {
Toggle("", isOn: $syncEnabled).labelsHidden()
}
}
}
HStack {
Spacer()
Button("Save") { save() }
.buttonStyle(.borderedProminent)
.disabled(!isValid)
}
}
.padding(32)
.frame(maxWidth: 760, alignment: .leading)
}
}
}
Building Blocks
FormRow
Right-aligned label column + control column inside a GridRow. The content column uses .frame(maxWidth: .infinity, alignment: .leading) to ensure all controls — including intrinsically-sized ones like Picker and Toggle — left-align consistently.
Without this, intrinsically-sized controls centre in the grid column while TextFields stretch to fill, creating a misaligned layout.
struct FormRow<Content: View>: View {
let label: String
let labelWidth: CGFloat
let content: Content
init(_ label: String, labelWidth: CGFloat,
@ViewBuilder content: () -> Content) {
self.label = label
self.labelWidth = labelWidth
self.content = content()
}
var body: some View {
GridRow {
Text(label)
.foregroundStyle(.secondary)
.frame(width: labelWidth, alignment: .trailing)
content
.frame(maxWidth: .infinity, alignment: .leading)
}
}
}
LiquidGlassSection
Use glassEffect(.regular, in:) as a .background {} for section containers:
struct LiquidGlassSection<Content: View>: View {
let title: String
let content: Content
init(title: String, @ViewBuilder content: () -> Content) {
self.title = title
self.content = content()
}
var body: some View {
VStack(alignment: .leading, spacing: 12) {
Text(title).font(.headline)
content
.padding(18)
.background {
RoundedRectangle(cornerRadius: 16, style: .continuous)
.fill(.clear)
.glassEffect(.regular, in: RoundedRectangle(cornerRadius: 16, style: .continuous))
}
}
}
}
GlassTile (rare, special callouts only)
Use glassEffect(_:in:) in a ZStack only for summary tiles, callouts, or inspector headers. Never for field rows or dense forms.
struct GlassTile<Content: View>: View {
let content: Content
init(@ViewBuilder content: () -> Content) { self.content = content() }
var body: some View {
ZStack {
RoundedRectangle(cornerRadius: 16, style: .continuous)
.fill(.clear)
.glassEffect(.regular, in: RoundedRectangle(cornerRadius: 16, style: .continuous))
content.padding(16)
}
}
}
Control Sizing Rules
The outer c
Установить swiftui-forms в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл swiftui-forms?
Build macOS 26+ SwiftUI forms using Liquid Glass design language. Use when creating preferences panes, inspectors, configuration screens, or settings views in SwiftUI for macOS 26. Provides Grid-based layout with right-aligned labels, correct control sizing, and correct glass modifier usage (glassEffect as background for containers, glassEffect in ZStack for rare tiles). Triggers on "build a form", "settings screen", "preferences view", "inspector panel", or any macOS SwiftUI form layout work.
Как установить скилл swiftui-forms?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл swiftui-forms запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic