How to use @material/mwc-floating-label - 3 common examples

To help you get started, we’ve selected a few @material/mwc-floating-label 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 / select / src / mwc-select-base.ts View on Github external
protected renderLabel() {
    return html`
      <label id="label">
        ${this.label}
      </label>
    `;
  }
github material-components / material-components-web-components / packages / textfield / src / mwc-textfield-base.ts View on Github external
protected renderLabelText() {
    let labelTemplate: TemplateResult|string = '';
    if (this.label &amp;&amp; !this.fullWidth) {
      labelTemplate = html`
      <label for="text-field">
        ${this.label}
      </label>`;
    }

    return html`
      ${labelTemplate}
      <div></div>
    `;
  }
github material-components / material-components-web-components / packages / textfield / src / mwc-textfield-base.ts View on Github external
protected renderOutlined() {
    let labelTemplate: TemplateResult|string = '';
    if (this.label) {
      labelTemplate = html`
        <label for="text-field">
          ${this.label}
        </label>
      `;
    }
    return html`
      
        ${labelTemplate}
      `;
  }

@material/mwc-floating-label

Material Design floating label web component

Apache-2.0
Latest version published 2 years ago

Package Health Score

67 / 100
Full package analysis

Popular @material/mwc-floating-label functions