3.0 beta 2

AX.Background

Implements component background layer.

Referenced by layers collection.

Show/hide

Assign true/false to the background property.

var obj = new AX.Component({
    classes: 'my-component',
    background: true
});

Inline styles

Accessible via background() object -

obj.background().styles({
    'background-color': '#f2f4f8',
    'opacity': 0.5
});

The styles can be dynamic when the value is a template or function -

obj.background().styles('background-color:{{ $total<0 ? "red" : "#f2f4f8"}}');

CSS

Use parent selector -

.my-component>.ax-background {
    background-color: #f2f4f8;
    opacity: 0.5;
}