PHPackages                             luyadev/luya-bootstrap4 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. luyadev/luya-bootstrap4

ActiveLuya-extension[Templating &amp; Views](/categories/templating)

luyadev/luya-bootstrap4
=======================

Bootstrap4 Assets and Helper classes like ActiveForm for LUYA and Yii2.

1.1.2(4y ago)1843.9k↑38.9%133MITPHP

Since Mar 9Pushed 3y ago5 watchersCompare

[ Source](https://github.com/luyadev/luya-bootstrap4)[ Packagist](https://packagist.org/packages/luyadev/luya-bootstrap4)[ Docs](https://luya.io)[ RSS](/packages/luyadev-luya-bootstrap4/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (18)Used By (3)

 [![LUYA Logo](https://raw.githubusercontent.com/luyadev/luya/master/docs/logo/luya-logo-0.2x.png)](https://raw.githubusercontent.com/luyadev/luya/master/docs/logo/luya-logo-0.2x.png)

Bootstrap 4
===========

[](#bootstrap-4)

[![LUYA](https://camo.githubusercontent.com/c30b61934591d3a6fcb8718a93fd61bf840c0abd8a8d49aa0fdd4ab99567bdf4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f776572656425323062792d4c5559412d627269676874677265656e2e737667)](https://luya.io)[![Tests](https://github.com/luyadev/luya-bootstrap4/workflows/Tests/badge.svg)](https://github.com/luyadev/luya-bootstrap4/workflows/Tests/badge.svg)[![Test Coverage](https://camo.githubusercontent.com/6f3fe3540f6c733ee2951002a892a87fd5fd4ab49a295b43799953fc5a5c28f5/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61353335363337316532376266343663323332392f746573745f636f766572616765)](https://codeclimate.com/github/luyadev/luya-bootstrap4/test_coverage)[![Latest Stable Version](https://camo.githubusercontent.com/bca1a50edcc44a9a4fc41c5bd567ff88a2b82e1178e4eed70d98d23b21de2e17/68747470733a2f2f706f7365722e707567782e6f72672f6c7579616465762f6c7579612d626f6f747374726170342f762f737461626c65)](https://packagist.org/packages/luyadev/luya-bootstrap4)[![Total Downloads](https://camo.githubusercontent.com/33268d964e4a03df1e0bd4d7289030dd16ef52af68cd1967ebd67a385fa1c209/68747470733a2f2f706f7365722e707567782e6f72672f6c7579616465762f6c7579612d626f6f747374726170342f646f776e6c6f616473)](https://packagist.org/packages/luyadev/luya-bootstrap4)[![Forum Support](https://camo.githubusercontent.com/3574a291a5d77f541be2a9aebff47cf60ed44274b70f9d90bdf6d0d7f4911892/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536c61636b2d6c7579616465762d79656c6c6f77677265656e2e737667)](https://forum.luya.io/)

Wrapper classes for new [Bootstrap 4](https://getbootstrap.com/) CSS Framework for [Yii](https://yiiframework.com) and/or [LUYA](https://luya.io).

> As of Bootstrap 4, the grid is completely written in FLEX. Check the [Browser Support](https://caniuse.com/#search=flex) to decide if you want to use Bootstrap 4 for your project.

This package contains the following components:

- Widgets
    - ActiveForm Widget (Yii ActiveForm Widget matching the Bootstrap 4 form styles)
    - Breadcrumbs
    - LinkPager
    - ActiveField Widget
    - Grid View / Action Column
- Tags
    - Tooltips
- CMS Blocks
    - Image
    - Carousel
- Asset File (contains precompiled bootstrap4 css and js files via cdn)

Installation
------------

[](#installation)

Add the package to your project via composer

```
composer require luyadev/luya-bootstrap4:^1.0
```

Assets Bundle
-------------

[](#assets-bundle)

To use the css and js files of bootstrap just register the `Bootstrap4Asset` into your layout file with the following code of your layout.php file:

```
luya\bootstrap4\Bootstrap4Asset::register($this)
```

At the top section of your layout file. This will include all required css and js files to use bootstrap 4 and set the right depenecy with jquery.

Active Form
-----------

[](#active-form)

A common way to build forms is the use thy Yii ActiveForm widget, to match all bootstrap4 components use it like following:

```

Bootstrap 4 ActiveForm
