Swiftpack.co - vapor-community/HTMLKit-Components as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by vapor-community.
vapor-community/HTMLKit-Components 0.1.1
This package contains common UI-components wich are build with HTMLKit.
⭐️ 4
🕓 1 year ago
macOS linux macOS iOS
.package(url: "https://github.com/vapor-community/HTMLKit-Components.git", from: "0.1.1")

Warning This repo is now archived as the components live in https://github.com/vapor-community/HTMLKit

HTMLKit-Components

This package contains common UI-components wich are build with HTMLKit.

Getting started

Installation

Add the packages to your dependecies and targets in your package file.

/// [Package.swift]

...
dependencies: [
    ...
    ///1. Add the packages
    .package(url: "https://github.com/vapor-community/HTMLKit-Components.git", from: "0.1.0")
],
targets: [
    .target( 
    ...
        dependencies: [
            ...
            /// 2. Add the products
            .product(name: "HTMLKitComponents", package: "HTMLKit-Components")
        ]
    ),
    ...

Example

/// [SimpleView.swift]

HStack(alignment: .top) {
    StackColumn(size: .four, offset: .eight) {
        List(direction: .vertical) {
            ListRow {
                Text {
                    "Languages"
                }
                .fontSize(.small)
            }
            ListRow {
                Link(destination: "#") {
                    "German"
                }
            }
            ListRow {
                Link(destination: "#") {
                    "English"
                }
            }
        }
    }

GitHub

link
Stars: 4
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.1.1
1 year ago

Patch

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