BrowseInput

Controls

Glass Input

A text field set into the glass, with an optional label and hint.

Preview

Installation

Install the package once, then import the parts you use into a standalone component.

Install

npm install ngx-vitreo @angular/cdk @floating-ui/dom
Import

import { GlassInput } from 'ngx-vitreo';

@Component({
  imports: [GlassInput],
  // ...
})

Usage

Usage

<form class="cpreview-form" (ngSubmit)="save()">
  <input
    glassInput
    label="Name"
    placeholder="Ada Lovelace"
    name="name"
    [attr.aria-invalid]="invalid() || null"
    [(ngModel)]="name"
    (ngModelChange)="invalid.set(false)"
  />
  <button glassButton type="submit" variant="prominent">Save</button>
</form>

API reference

GlassInput

input[glassInput]

InputTypeDefaultDescription
labelstringNoneVisible label above the field, linked with for.
hintstringNoneHelper text below the field, linked with aria-describedby.
typestring'text'Native input type.
ngModel / formControlnative inputNoneThe directive sits on the input, so Angular forms bind it as usual.