Skip to content

joyfill/components-swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,871 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

joyfill_logo

@joyfill/components-swift

Keep this README simple. For full setup and details, see the official Swift guide: https://docs.joyfill.io/ios/getting-started

Overview

This repo provides Joyfill SDKs for Apple platforms (Swift, SwiftUI):

  • Joyfill: UI components to display and interact with Joyfill documents (forms, tables, formulas).
  • JoyFillModel: Data models with advanced field types and structures.
  • JoyfillFormulas: Formula engine for calculations, strings, dates, arrays, and logic.
  • JoyfillAPIService: Networking for the Joyfill API.

More APIs and concepts: https://docs.joyfill.io/ios/getting-started

Requirements

  • iOS 15+ (minimum deployment target)

Installation (Swift Package Manager)

In Xcode: File > Add Packages, then add this URL:

https://github.com/joyfill/components-swift

Choose the libraries you need and the desired version (latest recommended).

Quick Start (SwiftUI)

Render a Joyfill document with the Form view using a DocumentEditor:

import SwiftUI
import Joyfill
import JoyfillModel

struct FormContainerView: View {
    let editor: DocumentEditor

    init(document: JoyDoc) {
        editor = DocumentEditor(document: document)
    }

    var body: some View {
        Form(documentEditor: editor)
    }
}

Examples

Key APIs

  • JoyDoc

    • Standardized JSON structure used by Joyfill components, APIs, and exports. Guide: JoyDoc usage
  • DocumentEditor

    • Core editor for a JoyDoc; pass to Form to render.
    • Field validation: validate() checks field-level rules (e.g., required, formats).
    • Includes Change API (change(changes:)) for programmatic updates. See Change API section in document-editor.md
    • Guide: document-editor.md
  • Schema validation

    • Checks document schema and version compatibility.
    • Guide: validate.md
  • Change events

    • Observe onChange, onFocus, onBlur, uploads, capture, and errors.
    • Guide: change-events.md

For parameters, properties, events, tables, charts, and formulas, see the docs below.

Learn More

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors