File

src/input/text-area.directive.ts

Description

A directive for applying styling to a textarea element.

Example:

<textarea ibmTextArea></textarea>

See the vanilla carbon docs for more detail.

Metadata

selector [ibmTextArea]

Index

Inputs
HostBindings

Inputs

theme

light or dark input theme

Type: "light" | "dark"

Default value: dark

HostBindings

class.bx--text-area
class.bx--text-area:
Default value : true
class.bx--text-area--light
class.bx--text-area--light:
import { Directive, HostBinding, Input } from "@angular/core";

/**
 * A directive for applying styling to a textarea element.
 *
 * Example:
 *
 * ```html
 * <textarea ibmTextArea></textarea>
 * ```
 *
 * See the [vanilla carbon docs](http://www.carbondesignsystem.com/components/text-input/code) for more detail.
 */
@Directive({
	selector: "[ibmTextArea]"
})
export class TextArea {
	/**
	 * `light` or `dark` input theme
	 */
	@Input() theme: "light" | "dark" = "dark";

	@HostBinding("class.bx--text-area") baseClass = true;
	@HostBinding("class.bx--text-area--light") get isLightTheme() {
		return this.theme === "light";
	}
}

results matching ""

    No results matching ""