label.d.ts 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import { ElementRef, Renderer } from '@angular/core';
  2. import { Config } from '../../config/config';
  3. import { Ion } from '../ion';
  4. /**
  5. * @name Label
  6. * @description
  7. * Labels are placed inside of an `ion-item` element and can be used
  8. * to describe an `ion-input`, `ion-toggle`, `ion-checkbox`, and more.
  9. *
  10. * @property [fixed] - A persistent label that sits next the input.
  11. * @property [floating] - A label that will float above the input if the input is empty or loses focus.
  12. * @property [stacked] - A stacked label will always appear on top of the input.
  13. *
  14. * @usage
  15. * ```html
  16. * <ion-item>
  17. * <ion-label>Username</ion-label>
  18. * <ion-input></ion-input>
  19. * </ion-item>
  20. *
  21. * <ion-item>
  22. * <ion-label fixed>Website</ion-label>
  23. * <ion-input type="url"></ion-input>
  24. * </ion-item>
  25. *
  26. * <ion-item>
  27. * <ion-label floating>Email</ion-label>
  28. * <ion-input type="email"></ion-input>
  29. * </ion-item>
  30. *
  31. * <ion-item>
  32. * <ion-label stacked>Phone</ion-label>
  33. * <ion-input type="tel"></ion-input>
  34. * </ion-item>
  35. *
  36. * <ion-item>
  37. * <ion-label>Toggle</ion-label>
  38. * <ion-toggle></ion-toggle>
  39. * </ion-item>
  40. *
  41. * <ion-item>
  42. * <ion-label>Checkbox</ion-label>
  43. * <ion-checkbox></ion-checkbox>
  44. * </ion-item>
  45. * ```
  46. *
  47. * @demo /docs/demos/src/label/
  48. * @see {@link ../../../../components#inputs Input Component Docs}
  49. * @see {@link ../../input/Input Input API Docs}
  50. *
  51. */
  52. export declare class Label extends Ion {
  53. private _id;
  54. /**
  55. * @hidden
  56. */
  57. type: string;
  58. constructor(config: Config, elementRef: ElementRef, renderer: Renderer, isFloating: string, isStacked: string, isFixed: string, isInset: string);
  59. /**
  60. * @hidden
  61. */
  62. id: string;
  63. /**
  64. * @hidden
  65. */
  66. readonly text: string;
  67. }