Svelte Material UI - Floating Label
A floating label in an input field. This is usually provided by the input component, but you can set it up manually.
See MDC Floating Label for more information on API and Sass mixins.
See the Sass variable file for styling variables.
You won't generally need to install this package, unless you're manually creating text fields.
npm install --save-dev @smui/floating-label
<!--Normally you wouldn't provide a floating label, but you can manually set up atextfield like this:-->Name
in action: https://sveltematerialui.com/demo/textfield
A Floating Label component.
Props / Defaults
- An array of actions and/or action/property arrays.
''- A CSS class string.
''- The ID of the input the label is to be associated with.
false- If the label is wrapped, a
spanelement is used with no
forattribute, otherwise, a
labelelement is used with a
All standard UI events are forwarded.
shake(boolean)- Shakes the label element.
float(boolean)- Floats the label element.
getWidth()- Get the width of the label element.