Skip to content

Latest commit

 

History

History
102 lines (71 loc) · 2.04 KB

README.md

File metadata and controls

102 lines (71 loc) · 2.04 KB

LeafBootstrap 🍃

Swift Version Vapor Version Build Status codecov GitHub license

This package wraps Bootstrap elements into convenient Leaf-Tags.

Installation

Add LeafBootstrap to the package dependencies (in your Package.swift file):

.package(url: "https://github.com/brokenhandsio/leaf-bootstrap.git", from: "1.0.0-beta")

as well as to your target:

.product(name: "LeafBootstrap", package: "leaf-bootstrap")

Getting started 🚀

First import LeafBootstrap and Leaf inside your configure.swift

import LeafBootstrap
import Leaf

Adding the Leaf tags

In order to render the Bootstrap elements, you will need to add the Bootstrap Leaf tags:

app.leaf.useBootstrapTags()

Supported tags

Alert

#bsAlert(style? = primary, classes?, attributes?): 
    some alert text
#endbsAlert

Badge

#bsBadge(type? = primary, classExtras?, attributes?): 
    badge text 
#endbsBadge

Button

#bsButton(type? = primary, classExtras?, attributes?):  
    btn text
#endbsButton

Input

#bsInput(type?, classExtras?, attributes?)

Textarea

#bsTextArea(classExtras?, attributes?):
    some textarea text
#endbsTextArea

Checkbox

#bsCheckbox(classExtras?, attributes?)

File Input

#bsFileInput(classExtras?, attributes?)