Yii2 - Asset Bundles
RTL direction
Dark theme

Asset Bundles

Yii manages assets in the unit of asset bundle. An asset bundle is simply a collection of assets located in a directory.

MDC asset bundles

MDC framework has many components, each component is bundled as an asset bundle for Yii2. This allows to register each component separately only when needed.

To register an asset inside a view simply call yii\web\AssetBundle::register().

use app\assets\AppAsset;
AppAsset::register($this);  // $this represents the view object

List of classes

Note: dependency assets will be loaded automatically.

Asset class Dependency
vip9008\MDC\assets\MaterialGrid
Contains core components and systems: responsive layout grid, the color system, the type system, elevation, material icons, and dividers.
yii\web\YiiAsset
yii\web\JqueryAsset
vip9008\MDC\assets\BannerAsset
Component: banners
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\ButtonAsset
vip9008\MDC\assets\ButtonAsset
Component: buttons
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\CardAsset
Component: cards
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\ButtonAsset
vip9008\MDC\assets\DataTableAsset
Component: data tables
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\ButtonAsset
vip9008\MDC\assets\CardAsset
vip9008\MDC\assets\SelectionControlAsset
vip9008\MDC\assets\DialogAsset
Component: dialogs
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\ButtonAsset
vip9008\MDC\assets\ImageListAsset
Component: image lists
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\ListAsset
Component: lists
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\MenuAsset
Component: menus
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\ListAsset
vip9008\MDC\assets\TextFieldAsset
vip9008\MDC\assets\ProgressIndicatorAsset
Component: progress indicator
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\SelectionControlAsset
Component: selection controls
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\ListAsset
vip9008\MDC\assets\SideSheetAsset
Component: side sheets
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\SliderAsset
Component: sliders
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\SnackbarAsset
Component: snackbars
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\ButtonAsset
vip9008\MDC\assets\TextFieldAsset
Component: text fields
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\TooltipAsset
Component: tooltips
vip9008\MDC\assets\MaterialGrid
vip9008\MDC\assets\TopAppBarAsset
Component: top app bar.
vip9008\MDC\assets\MaterialGrid