pointfree-html

1.0.0

Swift DSL for rendering type-safe HTML
coenttb/pointfree-html

What's New

1.0.0

2025-03-20T10:39:00Z

PointFreeHTML 1.0.0

The rewrite of swift-html by Brandon Williams and Stephen Cellis as found on https://github.com/pointfreeco/pointfreeco:

  • Forked into a separate package for ease of use via SPM
  • SwiftUI-style DSL for HTML elements and documents
  • Enhanced type safety for attributes and elements
  • Swift 5.9+ compatibility with modern language features
  • DocC documentation support
  • swift-dependencies integration for better testability
  • Swift Concurrency support
  • Streamlined component creation

Breaking changes:

  • Redesigned API for idiomatic Swift experience
  • Module renamed from HTML to PointFreeHTML
  • New package name: pointfree-html

Full Changelog: https://github.com/coenttb/pointfree-html/commits/1.0.0

swift-html

A Swift DSL for HTML based on pointfreeco/swift-html and updated to the version on pointfreeco/pointfreeco.

Development Status

Examples

You can create HTML documents using a declarative, SwiftUI-like syntax, with support for type-safe CSS:

import HTML
// Assuming an HTMLPreview: HTMLDocument type
let document = HTMLPreview {
  h1 { "Type-safe HTML" }
}

Acknowledgements

This project builds upon the foundational work by the Point-Free team, particularly Brandon Williams and Stephen Celis. This library is a fork and adaptation of their open-source projects, with the goal of making these ideas more accessible and customizable for various use cases. Thank you, Point-Free!

Installation

You can add pointfree-html to an Xcode project by including it as a package dependency:

Repository URL: https://github.com/coenttb/pointfree-html

For a Swift Package Manager project, add the dependency in your Package.swift file:

dependencies: [
  .package(url: "https://github.com/coenttb/pointfree-html", branch: "main")
]

Related projects

Feedback is much appreciated!

If you’re working on your own Swift project, feel free to learn, fork, and contribute.

Got thoughts? Found something you love? Something you hate? Let me know! Your feedback helps make this project better for everyone. Open an issue or start a discussion—I’m all ears.

Subscribe to my newsletter

Follow me on X

Link on Linkedin

License

PointFreeHtml is licensed under the MIT License. See MIT POINTFREE LICENSE for details.

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

Last updated: Fri May 16 2025 01:31:23 GMT-0900 (Hawaii-Aleutian Daylight Time)