How to use @material/mwc-textfield - 1 common examples

To help you get started, we’ve selected a few @material/mwc-textfield examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github material-components / material-components-web-components / packages / textarea / src / mwc-textarea-base.ts View on Github external
render() {
    const classes = {
      'mdc-text-field--disabled': this.disabled,
      'mdc-text-field--no-label': !this.label,
      'mdc-text-field--outlined': this.outlined,
      'mdc-text-field--fullwidth': this.fullWidth,
    };
    return html`
      <div class="mdc-text-field mdc-text-field--textarea ${classMap(classes)}">
        ${
        this.charCounter ? html`<div></div>` :
                           ''}
        ${this.renderInput()}
        ${this.outlined ? this.renderOutlined() : this.renderLabelText()}
      </div>
      ${this.helper ? this.renderHelperText() : ''}
    `;
  }

@material/mwc-textfield

Material Design textfield web component

Apache-2.0
Latest version published 2 years ago

Package Health Score

67 / 100
Full package analysis