Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

134 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FreakUI

FreakUI is a dependency-free, multi-platform SwiftUI framework from The Freak Company. It provides opinionated components, theme tokens, data presentation, charts, navigation styling, and interaction patterns for iOS and macOS applications.

0.5.0-beta is the first fully open-source, MIT-licensed public beta. It is intentionally breaking from 0.5.0-alpha, and the API may continue to evolve before 1.0.0.

Included

  • Theme, semantic color, spacing, radius, typography, formatting, accessibility, and haptic foundations
  • Actions, menus, inputs, pickers, selectors, toggles, counters, and sliders
  • Content, data-display, table, list, dashboard, and transaction components
  • Progress, proportion, pie, donut, and Cartesian chart presentation
  • Callouts, empty states, alerts, toasts, sections, containers, and multi-platform navigation helpers

FreakUI owns domain-neutral interface contracts. Application models, business rules, data access, subscriptions, and product-specific composition remain in the client application.

Documentation

This README is a quick start. The complete documentation includes setup guides, component examples, and fuller usage patterns. Xcode Quick Help provides concise API guidance at the call site, while GitHub Releases covers compatibility, breaking changes, and migration guidance.

Requirements

  • Swift 6.2+
  • Xcode with the Swift 6.2 toolchain
  • iOS 17+
  • macOS 14+

Installation

Add to an app with Swift Package Manager

Use Xcode's Swift Package Manager integration:

  1. Open File → Add Package Dependencies.

  2. Enter the FreakUI repository URL:

    https://github.com/valzubkov/FreakUI.git
    
  3. Select the exact 0.5.0-beta version for the public beta.

Add to another Swift package

If the project using FreakUI is itself a Swift package, edit its Package.swift. First, add FreakUI to the package-level dependencies array:

dependencies: [
    .package(
        url: "https://github.com/valzubkov/FreakUI.git",
        exact: "0.5.0-beta"
    )
]

Then add the FreakUI product to each target that imports it:

.target(
    name: "YourApp",
    dependencies: [
        .product(name: "FreakUI", package: "FreakUI")
    ]
)

Configure a theme

A minimal theme defines spacing, radius, and the Light and Dark Mode accent colors. Typography and every other semantic color use FreakUI defaults until overridden.

import FreakUI
import SwiftUI

struct AppTheme: FTheme {
    let spacingScale: FSpacingScale = .medium
    let radiusScale: FRadiusScale = .medium

    let lightPrimaryAccent = "#1E506C"
    let darkPrimaryAccent = "#1FAEFF"
}

@main
struct YourApp: App {
    init() {
        FThemeManager.shared.configure(with: AppTheme())
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

Theme colors accept opaque #RGB and #RRGGBB strings. Invalid values fall back individually and produce a debug diagnostic.

A complete theme can also provide separate text and number typography plus Light and Dark Mode values for semantic colors, backgrounds, and foregrounds. See the complete documentation for the full theme reference and configuration examples.

First use

import FreakUI
import SwiftUI

struct ContentView: View {
    var body: some View {
        FSection(
            heading: .titleAndSubtitle(
                title: "Today",
                subtitle: "Your current progress"
            )
        ) {
            FContainer(appearance: .elevated) {
                FDataLabel(
                    value: .double(2_450, format: .compact),
                    label: .string("kcal"),
                    icon: "flame.fill"
                )
            }
        }
        .padding(.paddingStandard)
    }
}

FreakUI uses one seven-step FComponentSize scale for component hierarchy and strict FHorizontalSizingMode / FVerticalSizingMode values for layout. Surface-owning components share FSurfaceAppearance, while action and navigation behavior share FInteraction.

License and brand

Source code is available under the MIT License. The FreakUI and The Freak Company names and logos are covered separately by the brand notice.

About

Multi-platform SwiftUI framework for single-target iOS and macOS applications. Made by The Freak Company.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages