Framework:
  • JavaScript / Vanilla JS
  • React.js
  • Vue.js
On this page

Angular Floating Labels Component

Angular floating label component. Create beautifully simple form labels that float over your input fields.

Loading...
## Example Wrap a pair of `cFormControl` and `label` elements in `cFormControl` to enable floating labels with textual form fields. A `placeholder` is required on each `input` as our method of CSS-only floating labels uses the `:placeholder-shown` pseudo-element. Also note that the `cFormControl` must come first so we can utilize a sibling selector (ex., `~`).
Loading...
Loading...
Loading...
When there's a `value` already defined, `cLabel` will automatically adjust to their floated position.
Loading...
Loading...
Loading...
## Textareas By default, `textarea` will be the same height as `input`.
Loading...
Loading...
Loading...
To set a custom height on your `textarea`, do not use the rows attribute. Instead, set an explicit height (either inline or via custom CSS).
Loading...
Loading...
Loading...
## Selects Other than `input`, floating labels are only available on `cSelect`. They work in the same way, but unlike `input`, it always shows the `cLabel` in its floated state. **Selects with `size` and `multiple` are not supported.**
Loading...
Loading...
Loading...
## Layout When working with the CoreUI for Bootstrap grid system, be sure to place form elements within column classes.
Loading...
Loading...
Loading...
--- ## API reference ### Form Module --- ### cFormFloating _directive_ ##### Inputs
| name | description | type | default | | ---- | ----------- | ---- | ------- | | `cFormFloating` | Enable floating labels. | `boolean` | _true_ |
  • GitHub
  • Twitter
  • Support
  • CoreUI (Vanilla)
  • CoreUI for React.js
  • CoreUI for Vue.js

CoreUI for Angular is Open Source UI Components Library for Angular.

Currently v5.4.12 Code licensed MIT , docs CC BY 3.0 .
CoreUI PRO requires a commercial license.