File

src/tiles/tile.component.ts

Description

Build application's tiles using this component. Get started with importing the module:

Example :
import { TilesModule } from 'carbon-components-angular';
Example :
<cds-tile>
        tile content
</cds-tile>

See demo

Metadata

Index

Properties
Inputs
HostBindings
Accessors

Inputs

theme
Type : "light" | "dark"
Default value : "dark"

HostBindings

class.cds--tile
Type : boolean
Default value : true
class.cds--tile--light
Type : boolean

Properties

tileClass
Default value : true
Decorators :
@HostBinding('class.cds--tile')

Accessors

lightThemeEnabled
getlightThemeEnabled()
import {
	Component,
	HostBinding,
	Input
} from "@angular/core";

/**
 * Build application's tiles using this component. Get started with importing the module:
 *
 * ```typescript
 * import { TilesModule } from 'carbon-components-angular';
 * ```
 *
 * ```html
 * <cds-tile>
 * 		tile content
 * </cds-tile>
 * ```
 *
 * [See demo](../../?path=/story/components-tiles--basic)
 */
@Component({
	selector: "cds-tile, ibm-tile",
	template: `<ng-content></ng-content>`
})
export class Tile {
	@HostBinding("class.cds--tile") tileClass = true;

	@HostBinding("class.cds--tile--light") get lightThemeEnabled() {
		return this.theme === "light";
	}

	/**
	 * @deprecated since v5 - Use `cdsLayer` directive instead
	 * Set to `"light"` to apply the light style
	 */
	@Input() theme: "light" | "dark" = "dark";
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""