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
Copy file name to clipboardExpand all lines: packages/ui-date-input/src/DateInput2/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
describes: DateInput2
3
3
---
4
4
5
-
> _Warning_: `DateInput2` is an **experimental**upgrade to the existing [`DateInput`](/#DateInput) component, offering easier configuration, better UX, improved accessibility, and a year picker. While it addresses key limitations of `DateInput`, it's still in the experimental phase, with some missing unit tests and potential API changes.
5
+
> _Info_: `DateInput2` is an upgrade to the [`DateInput`](/#DateInput) component, offering easier configuration, better UX, improved accessibility, and a year picker. Please consider updating to this for WCAG compatiblity and an overall better experience (for both devs and users).
Copy file name to clipboardExpand all lines: packages/ui-text-input/src/TextInput/README.md
+41-3Lines changed: 41 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,9 +182,6 @@ TextInput accepts focusable and non-focusable content before and/or after
182
182
the input text. A common use case is adding an icon or avatar to the input.
183
183
Focusable content will be focused separately from the input itself.
184
184
185
-
> Note: For any content larger than an icon or small avatar (multiple [Tags](#Tag), for example),
186
-
> use the `renderBeforeInput` property.
187
-
188
185
-```javascript
189
186
classExtraContentExampleextendsReact.Component {
190
187
constructor(props) {
@@ -301,6 +298,47 @@ Focusable content will be focused separately from the input itself.
301
298
render(<ExtraContentExample />)
302
299
```
303
300
301
+
Another common usecase is to add an `IconButton` at the end of a TextInput, e.g. for revealing the content of a password field. In these cases, please use the `withBorder={false}` and `withBackground={false}` props for the IconButton.
Having a clear button for a search field is also common but you don't need to implement anything to make that work, only set the `type` of the input to `search`:
329
+
330
+
```js
331
+
---
332
+
type: example
333
+
---
334
+
<TextInput
335
+
renderLabel="Search"
336
+
type="search"
337
+
placeholder="Find something..."
338
+
renderBeforeInput={<IconSearchSolid/>}
339
+
/>
340
+
```
341
+
304
342
### Setting width and display
305
343
306
344
To make the component display inline, set the `display` property to `inline-block`. To constrain the
0 commit comments