johnsnook / yii2-bootstrap4-card
It's an amazing widget that encapsulates bootstrap cards.
Installs: 178
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-bootstrap4: *
This package is not auto-updated.
Last update: 2024-11-19 18:46:42 UTC
README
It's a widget that encapsulates bootstrap cards.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist johnsnook/yii2-bootstrap4-card "*"
or add
"johnsnook/yii2-bootstrap4-card": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?php echo Card::widget([ 'headerOptions' => ['class' => 'bg-secondary'], 'title' => 'Top card', 'body' => $aBunchOfHtml, ]); /* OR */ echo Card::begin([ 'containerOptions' => ['class' => 'border border-secondary'], 'headerOptions' => ['class' => 'bg-dark text-white'], 'title' => 'Top card', ]); ?> <p class="card-text"> <?= echo CardlWidget::end();