Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neoacevedo/yii2-material3
Extensión Material Components de Yii2
https://github.com/neoacevedo/yii2-material3
Last synced: about 1 month ago
JSON representation
Extensión Material Components de Yii2
- Host: GitHub
- URL: https://github.com/neoacevedo/yii2-material3
- Owner: neoacevedo
- License: gpl-3.0
- Created: 2024-12-07T00:07:37.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-09T23:54:12.000Z (about 1 month ago)
- Last Synced: 2024-12-10T00:29:17.103Z (about 1 month ago)
- Language: PHP
- Size: 3.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
Yii2 Material 3
============Esta es una extensión primaria para [Yii framework 2.0](https://www.yiiframework.com). Encapsula componentes de [Material Design](https://m3.material.io/) en términos de Widgets Yii.
**NOTA**: Material 3 no tiene el componente `Card`, así que se ha adaptado el componente de la versión 2 para intentar seguir los lineamientos de la versión 3.
Instalación
------------La forma preferida de instalar esta extensión es a través de [composer](http://getcomposer.org/download/).
Luego ejecute
```
php composer.phar require --prefer-dist neoacevedo/yii2-material3
```o agregue
```js
"neoacevedo/yii2-material3": "*"
```a la sección require de su archivo `composer.json`.
Uso
----### Card e Icon Buttons
```php
registerCss($css);
?>[
'class' => 'demo-card'
],
'titleOptions' => [
'class' => 'mdc-typography--headline6'
],
'subtitleOptions' => [
'class' => 'mdc-typography--subtitle2'
],
'title' => 'Our Changing Planet',
'subtitle' => 'by Kurt Wagner',
'mediaSrc' => 'https://material-components.github.io/material-components-web-catalog/static/media/photos/3x2/2.jpg',
'actions' => [
'icons' => [
Html::iconButton(['icon' => 'dictionary']),
Html::iconButton(['icon' => 'bookmark'])
]
]
]);
?>
Visit ten places on our planet that are
undergoing the biggest changes today.
```
### Material3ActiveForm
```php
'form'
]);
?>
...```
### Material3ActiveField
```php
field($model, 'username', [
'options' => ['class' => 'mb-3']
])->textInput();// Filled input
echo $form->field($model, 'password', [
'options' => ['class' => 'mb-3']
])->passwordInput(['variant' => 'filled']);echo $form->field($model, 'remember_me')->checkbox();
?>
```### Chips
```php
= \neoacevedo\yii2\material3\widgets\Chip::widget([
'chips' => [
[
'type' => \neoacevedo\yii2\material3\widgets\Chip::TYPE_ASSIST,
'options' => [
'label' => 'Chip 1'
]
],
[
'type' => \neoacevedo\yii2\material3\widgets\Chip::TYPE_INPUT,
'options' => [
'label' => 'Chip 2'
]
],
[
'type' => \neoacevedo\yii2\material3\widgets\Chip::TYPE_FILTER,
'options' => [
'label' => 'Chip 3'
]
],
[
'type' => \neoacevedo\yii2\material3\widgets\Chip::TYPE_SUGGESTION,
'options' => [
'label' => 'Chip 4'
]
],
]
]) ?>
```