Skip to content
FelicityUI

SwiftUI

FelicityUI SwiftUI components are idiomatic Swift. They are not a DOM port.

Requires Xcode 15+ / iOS 17+. Generated files use #Preview and foregroundStyle.

Swift files install under UI/. After felicityui add, add UI/Components/*.swift and UI/Tokens/DesignColor.swift to the app target (or Swift package sources). The CLI cannot edit the Xcode project.

Button is a SwiftUI.Button with Role.destructive when needed, Dynamic Type via .body, and a VoiceOver label from the title. There is no disabled or pressed initializer — use .disabled(_:) for disabled, and selected: true for a segmented option. Dialog is .alert. Drawer is .sheet with detents — not a web-style side card.

Tokens install as DesignColor.swift. Do not recreate CSS hover graphs. Use press states the platform already has.

Related: Button, Input, Accordion, Dialog, Drawer, Installation.