You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @csspart form-control-label - The label's wrapper.
55
55
* @csspart form-control-input - The input's wrapper.
56
56
* @csspart form-control-help-text - The help text's wrapper.
57
+
* @csspart form-control-floating-label - The floating label text's wrapper.
57
58
* @csspart base - The component's base wrapper.
58
59
* @csspart border - The base part's absolutely positioned border. Allows for easy adjustment of border thickness without affecting component dimensions.
59
60
* @csspart input - The internal `<input>` control.
Copy file name to clipboardExpand all lines: packages/docs/src/stories/components/input.mdx
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,28 @@ Used to allow users to enter text. It can be displayed in several ways, dependin
31
31
- Collect user data in forms, including names, emails, dates, and passwords.
32
32
- Allow users to enter numerical values like quantities or prices.
33
33
34
+
#### Default Input
35
+
36
+
Use the “default” variant when clarity, scannability, and accessibility are your primary concerns.
37
+
38
+
- Long or descriptive labels, helper text, or units are needed.
39
+
- Forms with many fields that users must scan quickly.
40
+
- Complex fields with adornments, counters, or tooltips.
41
+
42
+
#### Floating Label Input
43
+
44
+
Use the “floating-label” variant to conserve vertical space and streamline simple forms, while still keeping the label visible.
45
+
46
+
- Compact layouts and simple fields.
47
+
- Short labels (1–3 words); minimal helper text.
48
+
- You want a clean look without duplicate placeholder text.
49
+
34
50
### Usage Guidelines
35
51
52
+
#### Variant Consistency
53
+
54
+
- Do not mix the two variants (default / floating label) within the same product, flow or form. Read the use cases above to know when to use each type.
0 commit comments