Skip to content

brokenhandsio/leaf-bootstrap

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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?)

About

A Leaf wrapper for Bootstrap πŸƒ

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • Swift 100.0%