@@ -14,7 +14,7 @@ TextInput is a form component to add default styling to the native text input.
1414< TextInput aria- label= " Zipcode" name= " zipcode" placeholder= " Zipcode" autoComplete= " postal-code" / >
1515```
1616
17- ## Text Input with Icons
17+ ## Text Input with icons
1818
1919``` jsx live
2020<>
@@ -27,7 +27,6 @@ TextInput is a form component to add default styling to the native text input.
2727 / >
2828
2929 < TextInput
30- sx= {{mt: 3 }}
3130 trailingVisual= {SearchIcon}
3231 aria- label= " Zipcode"
3332 name= " zipcode"
@@ -37,23 +36,17 @@ TextInput is a form component to add default styling to the native text input.
3736< / >
3837```
3938
40- ## Text Input with Text visuals
39+ ## Text Input with text visuals
4140
4241``` jsx live
4342<>
4443 < TextInput leadingVisual= " $" aria- label= " Cost of the thing" name= " cost" placeholder= " 23.45" / >
4544
46- < TextInput
47- sx= {{mt: 3 , width: ' 150px' }}
48- trailingVisual= " minutes"
49- aria- label= " Time in minutes"
50- name= " time"
51- placeholder= " 25"
52- / >
45+ < TextInput sx= {{width: ' 150px' }} trailingVisual= " minutes" aria- label= " Time in minutes" name= " time" placeholder= " 25" / >
5346< / >
5447```
5548
56- ## Text Input with Error and warning states
49+ ## Text Input with error and warning states
5750
5851``` jsx live
5952<>
@@ -66,7 +59,6 @@ TextInput is a form component to add default styling to the native text input.
6659 / >
6760
6861 < TextInput
69- sx= {{mt: 3 }}
7062 validationStatus= " warning"
7163 aria- label= " Zipcode"
7264 name= " zipcode"
@@ -86,6 +78,7 @@ TextInput is a form component to add default styling to the native text input.
8678
8779``` jsx live
8880< TextInput contrast aria- label= " Zipcode" name= " zipcode" placeholder= " Find user" autoComplete= " postal-code" / >
81+ ```
8982
9083## Props
9184
@@ -99,7 +92,7 @@ TextInput is a form component to add default styling to the native text input.
9992 defaultValue = " false"
10093 description = {
10194 <>
102- Adds < InlineCode > display : block < / InlineCode > to element
95+ Creates a full width input element
10396 </>
10497 }
10598 />
@@ -109,19 +102,36 @@ TextInput is a form component to add default styling to the native text input.
109102 defaultValue = " false"
110103 description = " Changes background color to a higher contrast color"
111104 />
112- < PropsTableRow
113- name= " variant"
114- type= " 'small' | 'large'"
115- description= " Creates a smaller or larger input than the default."
116- / >
105+ <PropsTableRow name = ' size' type = " 'small' | 'medium' | 'large'" description = " Creates a smaller or larger input than the default." />
106+
107+ <PropsTableRow
108+ name = " leadingVisual"
109+ type = { <>string | React.ComponentType</>}
110+ description = " Visual positioned on the left edge inside the input"
111+ />
112+ <PropsTableRow
113+ name = " trailingVisual"
114+ type = { <>string | React.ComponentType</>}
115+ description = " Visual positioned on the right edge inside the input"
116+ />
117+ <PropsTableRow name = " validationStatus" type = " 'warning' | 'error'" description = " Style the input to match the status" />
118+
119+ <PropsTableRow
120+ name = " variant"
121+ type = " 'small' | 'medium' | 'large'"
122+ description = " (Use size) Creates a smaller or larger input than the default."
123+ deprecated
124+ />
125+
117126 <PropsTableRow
118127 name = " width"
119128 type = {
120129 <>
121130 string | number | <Link href = " https://styled-system.com/guides/array-props" >Array< string | number> </Link >
122131 </>
123132 }
124- description= " Set the width of the input"
133+ description = " (Use sx prop) Set the width of the input"
134+ deprecated
125135 />
126136 <PropsTableRow
127137 name = " maxWidth"
@@ -130,7 +140,8 @@ TextInput is a form component to add default styling to the native text input.
130140 string | number | <Link href = " https://styled-system.com/guides/array-props" >Array< string | number> </Link >
131141 </>
132142 }
133- description= " Set the maximum width of the input"
143+ description = " (Use sx prop) Set the maximum width of the input"
144+ deprecated
134145 />
135146 <PropsTableRow
136147 name = " minWidth"
@@ -139,12 +150,14 @@ TextInput is a form component to add default styling to the native text input.
139150 string | number | <Link href = " https://styled-system.com/guides/array-props" >Array< string | number> </Link >
140151 </>
141152 }
142- description= " Set the minimum width of the input"
153+ description = " (Use sx prop) Set the minimum width of the input"
154+ deprecated
143155 />
144156 <PropsTableRow
145157 name = " icon"
146158 type = " React.ComponentType"
147- description= " An Octicon React component. To be used inside of input. Positioned on the left edge."
159+ description = " (Use leadingVisual or trailingVisual) An Octicon React component. To be used inside of input. Positioned on the left edge."
160+ deprecated
148161 />
149162 <PropsTableSxRow />
150163 <PropsTableRefRow
@@ -170,8 +183,8 @@ TextInput is a form component to add default styling to the native text input.
170183 adaptsToScreenSizes: true ,
171184 fullTestCoverage: false ,
172185 usedInProduction: true ,
173- usageExamplesDocumented: false ,
174- hasStorybookStories: false ,
186+ usageExamplesDocumented: true ,
187+ hasStorybookStories: true ,
175188 designReviewed: false ,
176189 a11yReviewed: false ,
177190 stableApi: false ,
@@ -180,4 +193,3 @@ TextInput is a form component to add default styling to the native text input.
180193 hasFigmaComponent: false
181194 }}
182195/>
183- ```
0 commit comments