Swiftpack.co - micheltlutz/jumpper as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by micheltlutz.
micheltlutz/jumpper v0.0.1
A simple framework for creating HTML with Swift
⭐️ 21
🕓 3 weeks ago
.package(url: "https://github.com/micheltlutz/jumpper.git", from: "v0.0.1")


Swift 5.2 Swift Package Manager Mac + Linux jumpper tests License codebeat badge

Buy Me A Coffee


In refactoring,

For now the python version of the project is available at: https://github.com/micheltlutz/Winged-Python

I will soon update this repository with improvements and evolutions following the same calls as the python version.


Welcome to jumpper. Is an open source framework, which is independent of other web frameworks or toolkits available on the market, such as Vapor, Kitura and Perfect. It can be used in conjunction with any of them and even alone. This shows how simple it is to build HTML pages using only Swift.

The idea of this library is to facilitate the creation of static or dynamic pages.

About 10 years ago I developed a library similar to this one, but in another language, it streamlined many projects that I developed.

I decided to bring these concepts to the language I use today.

The project is still under development, feel free to collaborate and leave suggestions, fork and share.

I hope it will be useful for more developers.

Let`s code.


Using in Package.swift

// swift-tools-version:5.6
import PackageDescription

let package = Package(
    name: "assessment",
    platforms: [
    dependencies: [
        .package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),
        .package(url: "https://github.com/jumpper/jumpper.git", from: "0.0.9")
    targets: [
            name: "App",
            dependencies: [
                .product(name: "Vapor", package: "vapor"),
                .product(name: "jumpper", package: "jumpper")
        .executableTarget(name: "Run", dependencies: [.target(name: "App")]),
        .testTarget(name: "AppTests", dependencies: [
            .target(name: "App"),
            .product(name: "XCTVapor", package: "vapor"),

Vapor usage

Need Leaf installed

import jumpper
import Leaf
import Vapor

router.get { req -> Future<View> in
     let div = Div()
     div.add("My first div with jumpper")
     return try req.view().render("base", ["title": "Hello jumpper", "body": div.getString()])

Without Leaf

import jumpper
import Vapor

protocol JumpperPageProtocol {
    func render() throws -> EventLoopFuture<Response>

public final class IndexPage: JumpperPageProtocol {
    // MARK: - Render

    public func render() throws -> EventLoopFuture<Response> {
        let response = Response()
        let divC = Div()
        response.body = .init(string: divC.getString())
        return response.encodeResponse(status: .ok, headers: HTTPHeaders.init([("Content-Type", "text/html; charset=UTF-8")]), for: request)

jumpper vapor project demo

Elements Video Demo

Watch the video


Stars: 21
Last commit: 3 days ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1 year ago

New Component Radio


let radio = Radio("option1", id: "option1", name: "option1")

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics