File tree 1 file changed +47
-0
lines changed 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,53 @@ export default function App() {
41
41
}
42
42
```
43
43
44
+ ## Inline Text Input
45
+
46
+ A text input that grows along with its content.
47
+
48
+ ``` jsx preview
49
+ import {Provider } from ' @clayui/core' ;
50
+ import Form , {ClayInput } from ' @clayui/form' ;
51
+ import React , {useState } from ' react' ;
52
+
53
+ import ' @clayui/css/lib/css/atlas.css' ;
54
+
55
+ export default function App () {
56
+ return (
57
+ < Provider spritemap= " /public/icons.svg" >
58
+ < div className= " p-4" >
59
+ < Form>
60
+ < Form .Group >
61
+ < label htmlFor= " inlineTextInput1" >
62
+ Inline Text Input with Label
63
+ < / label>
64
+ < ClayInput .InlineText
65
+ id= " inlineTextInput1"
66
+ placeholder= " Placeholder"
67
+ / >
68
+ < / Form .Group >
69
+ < Form .Group >
70
+ < label htmlFor= " inlineTextInput1" > Readonly< / label>
71
+ < ClayInput .InlineText
72
+ id= " inlineTextInput2"
73
+ placeholder= " Placeholder"
74
+ readonly= {true }
75
+ value= " This is readonly text in the input."
76
+ / >
77
+ < / Form .Group >
78
+ < Form .Group >
79
+ < ClayInput .InlineText
80
+ id= " inlineTextInput3"
81
+ placeholder= " Untitled Case Study"
82
+ / >
83
+ < / Form .Group >
84
+ < / Form>
85
+ < / div>
86
+ < / Provider>
87
+ );
88
+ }
89
+ ```
90
+
44
91
## Validation
45
92
46
93
` .has-error ` , ` .has-success ` and ` .has-warning ` classes are used in ` ClayForm.Group ` to identifier validation state of the form group items.
You can’t perform that action at this time.
0 commit comments