@iress-oss/ids-mcp-server 6.0.0-alpha.0 → 6.0.0-alpha.1-canary-20251204014525-3f0dce4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/searchHandlers.test.js +8 -2
- package/dist/toolHandler.test.js +9 -9
- package/dist/utils.test.js +6 -2
- package/package.json +32 -30
- package/generated/docs/components-alert-docs.md +0 -702
- package/generated/docs/components-autocomplete-docs.md +0 -1433
- package/generated/docs/components-autocomplete-recipes-docs.md +0 -104
- package/generated/docs/components-badge-docs.md +0 -531
- package/generated/docs/components-button-docs.md +0 -1442
- package/generated/docs/components-buttongroup-docs.md +0 -748
- package/generated/docs/components-card-docs.md +0 -944
- package/generated/docs/components-checkbox-docs.md +0 -694
- package/generated/docs/components-checkboxgroup-docs.md +0 -1087
- package/generated/docs/components-checkboxgroup-recipes-docs.md +0 -119
- package/generated/docs/components-col-docs.md +0 -881
- package/generated/docs/components-container-docs.md +0 -123
- package/generated/docs/components-divider-docs.md +0 -576
- package/generated/docs/components-expander-docs.md +0 -594
- package/generated/docs/components-field-docs.md +0 -2007
- package/generated/docs/components-filter-docs.md +0 -1322
- package/generated/docs/components-hide-docs.md +0 -702
- package/generated/docs/components-icon-docs.md +0 -816
- package/generated/docs/components-image-docs.md +0 -493
- package/generated/docs/components-inline-docs.md +0 -2003
- package/generated/docs/components-input-docs.md +0 -867
- package/generated/docs/components-input-recipes-docs.md +0 -140
- package/generated/docs/components-inputcurrency-docs.md +0 -689
- package/generated/docs/components-inputcurrency-recipes-docs.md +0 -115
- package/generated/docs/components-introduction-docs.md +0 -450
- package/generated/docs/components-label-docs.md +0 -562
- package/generated/docs/components-link-docs.md +0 -586
- package/generated/docs/components-menu-docs.md +0 -1146
- package/generated/docs/components-menu-menuitem-docs.md +0 -739
- package/generated/docs/components-modal-docs.md +0 -1346
- package/generated/docs/components-panel-docs.md +0 -600
- package/generated/docs/components-placeholder-docs.md +0 -446
- package/generated/docs/components-popover-docs.md +0 -1529
- package/generated/docs/components-popover-recipes-docs.md +0 -211
- package/generated/docs/components-progress-docs.md +0 -568
- package/generated/docs/components-provider-docs.md +0 -160
- package/generated/docs/components-radio-docs.md +0 -563
- package/generated/docs/components-radiogroup-docs.md +0 -1153
- package/generated/docs/components-readonly-docs.md +0 -535
- package/generated/docs/components-richselect-docs.md +0 -5836
- package/generated/docs/components-row-docs.md +0 -2354
- package/generated/docs/components-select-docs.md +0 -940
- package/generated/docs/components-skeleton-docs.md +0 -597
- package/generated/docs/components-skeleton-recipes-docs.md +0 -76
- package/generated/docs/components-skiplink-docs.md +0 -587
- package/generated/docs/components-slideout-docs.md +0 -1036
- package/generated/docs/components-slider-docs.md +0 -828
- package/generated/docs/components-spinner-docs.md +0 -450
- package/generated/docs/components-stack-docs.md +0 -923
- package/generated/docs/components-table-ag-grid-docs.md +0 -1444
- package/generated/docs/components-table-docs.md +0 -2327
- package/generated/docs/components-tabset-docs.md +0 -768
- package/generated/docs/components-tabset-tab-docs.md +0 -550
- package/generated/docs/components-tag-docs.md +0 -548
- package/generated/docs/components-text-docs.md +0 -585
- package/generated/docs/components-toaster-docs.md +0 -755
- package/generated/docs/components-toggle-docs.md +0 -614
- package/generated/docs/components-tooltip-docs.md +0 -747
- package/generated/docs/components-validationmessage-docs.md +0 -1161
- package/generated/docs/contact-us-docs.md +0 -27
- package/generated/docs/extensions-editor-docs.md +0 -1181
- package/generated/docs/extensions-editor-recipes-docs.md +0 -89
- package/generated/docs/foundations-accessibility-docs.md +0 -40
- package/generated/docs/foundations-consistency-docs.md +0 -52
- package/generated/docs/foundations-content-docs.md +0 -23
- package/generated/docs/foundations-grid-docs.md +0 -74
- package/generated/docs/foundations-introduction-docs.md +0 -19
- package/generated/docs/foundations-principles-docs.md +0 -70
- package/generated/docs/foundations-responsive-breakpoints-docs.md +0 -193
- package/generated/docs/foundations-tokens-colour-docs.md +0 -564
- package/generated/docs/foundations-tokens-elevation-docs.md +0 -155
- package/generated/docs/foundations-tokens-introduction-docs.md +0 -190
- package/generated/docs/foundations-tokens-radius-docs.md +0 -71
- package/generated/docs/foundations-tokens-spacing-docs.md +0 -89
- package/generated/docs/foundations-tokens-typography-docs.md +0 -322
- package/generated/docs/foundations-user-experience-docs.md +0 -63
- package/generated/docs/foundations-visual-design-docs.md +0 -46
- package/generated/docs/foundations-z-index-stacking-docs.md +0 -31
- package/generated/docs/frequently-asked-questions-docs.md +0 -53
- package/generated/docs/get-started-develop-docs.md +0 -209
- package/generated/docs/get-started-using-storybook-docs.md +0 -68
- package/generated/docs/guidelines.md +0 -2054
- package/generated/docs/introduction-docs.md +0 -87
- package/generated/docs/news-version-6-docs.md +0 -93
- package/generated/docs/patterns-form-docs.md +0 -3902
- package/generated/docs/patterns-form-recipes-docs.md +0 -1370
- package/generated/docs/patterns-introduction-docs.md +0 -24
- package/generated/docs/patterns-loading-docs.md +0 -4043
- package/generated/docs/resources-code-katas-docs.md +0 -29
- package/generated/docs/resources-introduction-docs.md +0 -38
- package/generated/docs/resources-mcp-server-docs.md +0 -27
- package/generated/docs/resources-migration-guides-from-v4-to-v5-docs.md +0 -437
- package/generated/docs/styling-props-colour-docs.md +0 -172
- package/generated/docs/styling-props-elevation-docs.md +0 -88
- package/generated/docs/styling-props-radius-docs.md +0 -86
- package/generated/docs/styling-props-reference-docs.md +0 -160
- package/generated/docs/styling-props-screen-readers-docs.md +0 -71
- package/generated/docs/styling-props-sizing-docs.md +0 -627
- package/generated/docs/styling-props-spacing-docs.md +0 -2282
- package/generated/docs/styling-props-typography-docs.md +0 -121
- package/generated/docs/themes-available-themes-docs.md +0 -66
- package/generated/docs/themes-introduction-docs.md +0 -121
- package/generated/docs/versions-docs.md +0 -17
- /package/{LICENSE.txt → LICENSE} +0 -0
|
@@ -1,867 +0,0 @@
|
|
|
1
|
-
[](#input)Input
|
|
2
|
-
===============
|
|
3
|
-
|
|
4
|
-
Overview
|
|
5
|
-
--------
|
|
6
|
-
|
|
7
|
-
Inputs allow a user to input and interact with data. This component should be used as a child of the `IressField` component to ensure the correct placement of elements like label, error & hint text.
|
|
8
|
-
|
|
9
|
-
* * *
|
|
10
|
-
|
|
11
|
-
Updated
|
|
12
|
-
|
|
13
|
-
**Recently updated**
|
|
14
|
-
|
|
15
|
-
This component has been recently updated with new props. The props have been marked as beta. Please tell us if there are any issues.
|
|
16
|
-
|
|
17
|
-
Hide code
|
|
18
|
-
|
|
19
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
20
|
-
|
|
21
|
-
<IressInput
|
|
22
|
-
append\=""
|
|
23
|
-
placeholder\="Enter your name"
|
|
24
|
-
prepend\=""
|
|
25
|
-
/>
|
|
26
|
-
|
|
27
|
-
Copy
|
|
28
|
-
|
|
29
|
-
[](#props)Props
|
|
30
|
-
---------------
|
|
31
|
-
|
|
32
|
-
| Name | Description | Default | Control |
|
|
33
|
-
| --- | --- | --- | --- |
|
|
34
|
-
| alignRight |
|
|
35
|
-
Set input content align to right, useful for numeric inputs.
|
|
36
|
-
|
|
37
|
-
booleanundefined
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
false
|
|
44
|
-
|
|
45
|
-
| Set object |
|
|
46
|
-
| append |
|
|
47
|
-
|
|
48
|
-
Content to append to the input field, usually a button or icon.
|
|
49
|
-
|
|
50
|
-
ReactNode
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
| \- |
|
|
55
|
-
|
|
56
|
-
""
|
|
57
|
-
|
|
58
|
-
|
|
|
59
|
-
| bg |
|
|
60
|
-
|
|
61
|
-
**`bg`** sets the background color of an element using the `background-color` css property using the color tokens in the design system.
|
|
62
|
-
|
|
63
|
-
We recommend using the following token values for best background contrast:
|
|
64
|
-
|
|
65
|
-
* `colour.primary.fill` for primary backgrounds that need to stand out
|
|
66
|
-
* `colour.primary.surface` for primary backgrounds that need to be less prominent
|
|
67
|
-
* `colour.neutral.10` for the base background color, normally white in light mode or shade of grey in dark mode
|
|
68
|
-
* `colour.neutral.20` for a slightly darker background color, used in neutral state components
|
|
69
|
-
* `colour.system.danger.fill` for error backgrounds that need to stand out
|
|
70
|
-
* `colour.system.danger.surface` for error backgrounds that need to be less prominent
|
|
71
|
-
* `colour.system.success.fill` for success backgrounds that need to stand out
|
|
72
|
-
* `colour.system.success.surface` for success backgrounds that need to be less prominent
|
|
73
|
-
* `colour.system.warning.fill` for warning backgrounds that need to stand out
|
|
74
|
-
* `colour.system.warning.surface` for warning backgrounds that need to be less prominent
|
|
75
|
-
* `colour.system.info.fill` for info backgrounds that need to stand out
|
|
76
|
-
* `colour.system.info.surface` for info backgrounds that need to be less prominent
|
|
77
|
-
|
|
78
|
-
"colorPalette""colour.primary.fill""colour.primary.fillHover""colour.primary.onFill""colour.primary.surface""colour.primary.surfaceHover""colour.primary.text"... 33 more ...Show 1 more...
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
| \- | Set object |
|
|
83
|
-
| borderRadius |
|
|
84
|
-
|
|
85
|
-
The **`border-radius`** CSS property rounds the corners of an element's outer border edge using the radius tokens in the design system.
|
|
86
|
-
|
|
87
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
88
|
-
| --- | --- | --- | --- | --- |
|
|
89
|
-
| **4** | **4** | **5** | **12** | **9** |
|
|
90
|
-
| 1 _\-x-_ | | 3 _\-x-_ | | |
|
|
91
|
-
|
|
92
|
-
"none" | "radius.000" | "radius.025" | "radius.050" | "radius.075" | "radius.100" | "radius.system.badge" | "radius.system.button" | "radius.system.form" | "radius.system.layout" | Partial<...> | undefined
|
|
93
|
-
|
|
94
|
-
| \- | Set object |
|
|
95
|
-
| clearable |
|
|
96
|
-
|
|
97
|
-
If `true`, then user can clear the value of the input. Will be ignored if `rows` prop is in use.
|
|
98
|
-
|
|
99
|
-
booleanundefined
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
|
104
|
-
|
|
105
|
-
false
|
|
106
|
-
|
|
107
|
-
| Set object |
|
|
108
|
-
| color |
|
|
109
|
-
|
|
110
|
-
The **`color`** CSS property sets the foreground color value of an element's text and text decorations using the colour tokens from the design system. It also sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`.
|
|
111
|
-
|
|
112
|
-
We recommend using the following token values for best color contrast:
|
|
113
|
-
|
|
114
|
-
* `colour.primary.onFill` used on top of `colour.primary.fill` for primary text that needs to stand out
|
|
115
|
-
* `colour.primary.text` used on top of `colour.primary.surface` or `colour.neutral.10` for primary text that needs to be less prominent
|
|
116
|
-
* `colour.neutral.70` used on top of `colour.neutral.10` or `colour.neutral.20` for muted text
|
|
117
|
-
* `colour.neutral.80` used on top of `colour.neutral.10` or `colour.neutral.20` for standard text
|
|
118
|
-
* `colour.system.danger.onFill` used on top of `colour.system.danger.fill` for error text that needs to stand out
|
|
119
|
-
* `colour.system.danger.text` used on top of `colour.system.danger.surface` for error text that needs to be less prominent
|
|
120
|
-
* `colour.system.success.onFill` used on top of `colour.system.success.fill` for success text that needs to stand out
|
|
121
|
-
* `colour.system.success.text` used on top of `colour.system.success.surface` for success text that needs to be less prominent
|
|
122
|
-
* `colour.system.warning.onFill` used on top of `colour.system.warning.fill` for warning text that needs to stand out
|
|
123
|
-
* `colour.system.warning.text` used on top of `colour.system.warning.surface` for warning text that needs to be less prominent
|
|
124
|
-
* `colour.system.info.onFill` used on top of `colour.system.info.fill` for informative text that needs to stand out
|
|
125
|
-
* `colour.system.info.text` used on top of `colour.system.info.surface` for informative text that needs to be less prominent
|
|
126
|
-
|
|
127
|
-
"colorPalette""colour.primary.fill""colour.primary.fillHover""colour.primary.onFill""colour.primary.surface""colour.primary.surfaceHover""colour.primary.text"... 33 more ...Show 1 more...
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
| \- | Set object |
|
|
132
|
-
| defaultValue |
|
|
133
|
-
|
|
134
|
-
The value of the input. Can be a string or a number. Use for uncontrolled inputs.
|
|
135
|
-
|
|
136
|
-
FormControlValueundefined
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
| \- | Set object |
|
|
141
|
-
| focusable |
|
|
142
|
-
|
|
143
|
-
The `focusable` prop is used to apply the focus elevation when focused. It can be set to `true` to apply focus styles on focus, or `'within'` to apply focus styles when the element or any of its children are focused.
|
|
144
|
-
|
|
145
|
-
"true""within"undefined
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
| \- | Set object |
|
|
150
|
-
| formatter |
|
|
151
|
-
|
|
152
|
-
Bring your own formatter that will be used to format the value when the input is not focused, allowing you to display the value in a different format. e.g. User type in value="dsf 987kkk123" => result after formatter: $987,123 (string)
|
|
153
|
-
|
|
154
|
-
((value?: T | undefined) => string | number) | undefined
|
|
155
|
-
|
|
156
|
-
| \- | \- |
|
|
157
|
-
| hide |
|
|
158
|
-
|
|
159
|
-
Set **`hide`** to hide an element completely using `display: none`. It can also be set to an object of breakpoints to hide the element at specific breakpoints.
|
|
160
|
-
|
|
161
|
-
Hide on all breakpoints: `hide: true` Hide on specific breakpoints: `hide: { xs: false, sm: true, md: false, lg: true, xl: false, xxl: true }`
|
|
162
|
-
|
|
163
|
-
Notes:
|
|
164
|
-
|
|
165
|
-
* If you need to hide an element but allow it to be visible to screen readers, use the `srOnly` prop instead.
|
|
166
|
-
* Consider if you can conditionally render the element instead of hiding it.
|
|
167
|
-
|
|
168
|
-
boolean | Partial<Record<"base" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl", boolean>> | undefined
|
|
169
|
-
|
|
170
|
-
| \- | Set object |
|
|
171
|
-
| inline |
|
|
172
|
-
|
|
173
|
-
Make prepend/append element closer to the input content.
|
|
174
|
-
|
|
175
|
-
booleanundefined
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
| \- | Set object |
|
|
180
|
-
| layerStyle |
|
|
181
|
-
|
|
182
|
-
Elevate a layer by using a **`layerStyle`**. These are connected to the elevation tokens in the design system. They can be combined to create hierarchy and structure.
|
|
183
|
-
|
|
184
|
-
* `elevation.raised`: Raised elevations sit slightly higher than other content. They are reserved for cards that can be moved, such as Jira issue cards and Trello cards. In special circumstances, they can be used for cards as a way to provide additional heirarchy or emphasis.
|
|
185
|
-
* `elevation.floating`: Floating is the highest elevation available. It is reserved for a UI that sits over another UI, such as modals, dialogs, dropdown menus, floating toolbars, and floating single-action buttons.
|
|
186
|
-
* `elevation.overflow`: Overflow is a shadow indicating content has scrolled outside a view. It can be used for vertical or horizontal scroll. An example of overflow shadows is the horizontal scroll in tables on a Confluence page.
|
|
187
|
-
|
|
188
|
-
"elevation.raised" | "elevation.floating" | "elevation.overflow" | "elevation.focus" | "elevation.focusCompact" | Partial<Record<"base" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl", "elevation.raised" | ... 3 more ... | "elevation.focusCompact">> | undefined
|
|
189
|
-
|
|
190
|
-
| \- | Set object |
|
|
191
|
-
| loading |
|
|
192
|
-
|
|
193
|
-
The loading states of the input field. If provided a string, will use that text as the loading message.
|
|
194
|
-
|
|
195
|
-
stringbooleanundefined
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
| \- | Set object |
|
|
200
|
-
| m |
|
|
201
|
-
|
|
202
|
-
The **`m`** property is short for `margin`, and sets the margin area on all four sides of an element.
|
|
203
|
-
|
|
204
|
-
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
205
|
-
|
|
206
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
207
|
-
| --- | --- | --- | --- | --- |
|
|
208
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
209
|
-
|
|
210
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
| \- | Set object |
|
|
215
|
-
| maxWidth |
|
|
216
|
-
|
|
217
|
-
The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`.
|
|
218
|
-
|
|
219
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
220
|
-
| --- | --- | --- | --- | --- |
|
|
221
|
-
| **1** | **1** | **1** | **12** | **7** |
|
|
222
|
-
|
|
223
|
-
"slider.tick""auto""container.xs""container.sm""container.md""container.lg""container.xl""container.xxl"Show 6 more...
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
| \- | Set object |
|
|
228
|
-
| mb |
|
|
229
|
-
|
|
230
|
-
The **`mb`** property is short for `margin-bottom` and sets the margin area on the bottom side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
231
|
-
|
|
232
|
-
It uses the spacing tokens in the design system.
|
|
233
|
-
|
|
234
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
235
|
-
| --- | --- | --- | --- | --- |
|
|
236
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
237
|
-
|
|
238
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
| \- | Set object |
|
|
243
|
-
| ml |
|
|
244
|
-
|
|
245
|
-
The **`ml`** property is short for `margin-left` and sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
246
|
-
|
|
247
|
-
It uses the spacing tokens in the design system.
|
|
248
|
-
|
|
249
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
250
|
-
| --- | --- | --- | --- | --- |
|
|
251
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
252
|
-
|
|
253
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
| \- | Set object |
|
|
258
|
-
| mr |
|
|
259
|
-
|
|
260
|
-
The **`mr`** property is short for `margin-right` and sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
261
|
-
|
|
262
|
-
It uses the spacing tokens in the design system.
|
|
263
|
-
|
|
264
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
265
|
-
| --- | --- | --- | --- | --- |
|
|
266
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
267
|
-
|
|
268
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
| \- | Set object |
|
|
273
|
-
| mt |
|
|
274
|
-
|
|
275
|
-
The **`mt`** property is short for `margin-top` and sets the margin area on the top side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
276
|
-
|
|
277
|
-
It uses the spacing tokens in the design system.
|
|
278
|
-
|
|
279
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
280
|
-
| --- | --- | --- | --- | --- |
|
|
281
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
282
|
-
|
|
283
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
| \- | Set object |
|
|
288
|
-
| mx |
|
|
289
|
-
|
|
290
|
-
The **`mx`** property is short for `margin-inline`. It is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
|
|
291
|
-
|
|
292
|
-
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
293
|
-
|
|
294
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
295
|
-
| --- | --- | --- | --- | --- |
|
|
296
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
297
|
-
|
|
298
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
| \- | Set object |
|
|
303
|
-
| my |
|
|
304
|
-
|
|
305
|
-
The **`my`** property is short for `margin-block`. It defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
|
|
306
|
-
|
|
307
|
-
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
308
|
-
|
|
309
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
310
|
-
| --- | --- | --- | --- | --- |
|
|
311
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
312
|
-
|
|
313
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
| \- | Set object |
|
|
318
|
-
| noGutter |
|
|
319
|
-
|
|
320
|
-
The **`noGutter`** property is used to remove the bottom margin from the last child of a component. This is useful when you want to avoid extra spacing at the end of a layout.
|
|
321
|
-
|
|
322
|
-
booleanundefined
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
| \- | Set object |
|
|
327
|
-
| onChange |
|
|
328
|
-
|
|
329
|
-
Emitted when the input value changes with the new changed value.
|
|
330
|
-
|
|
331
|
-
((e: ChangeEvent<InputBaseElement<TRows>>, value?: T | undefined) => void) | undefined
|
|
332
|
-
|
|
333
|
-
| \- | \- |
|
|
334
|
-
| onClear |
|
|
335
|
-
|
|
336
|
-
Emitted when the input is manually cleared.
|
|
337
|
-
|
|
338
|
-
((e: ChangeEvent<InputBaseElement<TRows>>) => void) | undefined
|
|
339
|
-
|
|
340
|
-
| \- | \- |
|
|
341
|
-
| p |
|
|
342
|
-
|
|
343
|
-
The **`p`** property is short for `padding`, and sets the padding area on all four sides of an element at once.
|
|
344
|
-
|
|
345
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
346
|
-
|
|
347
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
348
|
-
| --- | --- | --- | --- | --- |
|
|
349
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
350
|
-
|
|
351
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
| \- | Set object |
|
|
356
|
-
| pb |
|
|
357
|
-
|
|
358
|
-
The **`pb`** property is short for `padding-bottom` and sets the padding area on the bottom side of an element.
|
|
359
|
-
|
|
360
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
361
|
-
|
|
362
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
363
|
-
| --- | --- | --- | --- | --- |
|
|
364
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
365
|
-
|
|
366
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
| \- | Set object |
|
|
371
|
-
| pl |
|
|
372
|
-
|
|
373
|
-
The **`pl`** property is short for `padding-left` and sets the padding area on the left side of an element.
|
|
374
|
-
|
|
375
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
376
|
-
|
|
377
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
378
|
-
| --- | --- | --- | --- | --- |
|
|
379
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
380
|
-
|
|
381
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
| \- | Set object |
|
|
386
|
-
| placeholder |
|
|
387
|
-
|
|
388
|
-
string
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
| \- | Enter your name |
|
|
393
|
-
| pr |
|
|
394
|
-
|
|
395
|
-
The **`pr`** property is short for `padding-right` and sets the padding area on the right side of an element.
|
|
396
|
-
|
|
397
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
398
|
-
|
|
399
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
400
|
-
| --- | --- | --- | --- | --- |
|
|
401
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
402
|
-
|
|
403
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
| \- | Set object |
|
|
408
|
-
| prepend |
|
|
409
|
-
|
|
410
|
-
Content to prepended to the input field, usually an icon.
|
|
411
|
-
|
|
412
|
-
ReactNode
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
| \- |
|
|
417
|
-
|
|
418
|
-
""
|
|
419
|
-
|
|
420
|
-
|
|
|
421
|
-
| pt |
|
|
422
|
-
|
|
423
|
-
The **`pt`** property is short for `padding-top` and sets the padding area on the top side of an element.
|
|
424
|
-
|
|
425
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
426
|
-
|
|
427
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
428
|
-
| --- | --- | --- | --- | --- |
|
|
429
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
430
|
-
|
|
431
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
| \- | Set object |
|
|
436
|
-
| px |
|
|
437
|
-
|
|
438
|
-
The **`px`** property is short for `padding-inline`. It is a shorthand property that defines both the logical inline start and end paddings of an element, which maps to physical paddings depending on the element's writing mode, directionality, and text orientation.
|
|
439
|
-
|
|
440
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
441
|
-
|
|
442
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
443
|
-
| --- | --- | --- | --- | --- |
|
|
444
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
445
|
-
|
|
446
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
| \- | Set object |
|
|
451
|
-
| py |
|
|
452
|
-
|
|
453
|
-
The **`py`** property is short for `padding-block`. It defines the logical block start and end paddings of an element, which maps to physical paddings depending on the element's writing mode, directionality, and text orientation.
|
|
454
|
-
|
|
455
|
-
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
456
|
-
|
|
457
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
458
|
-
| --- | --- | --- | --- | --- |
|
|
459
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
460
|
-
|
|
461
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
| \- | Set object |
|
|
466
|
-
| rowGap |
|
|
467
|
-
|
|
468
|
-
The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows.
|
|
469
|
-
|
|
470
|
-
Note: It only has an effect when used as a direct child of a layout component, such as IressRow, IressStack or IressInline.
|
|
471
|
-
|
|
472
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
473
|
-
| --- | --- | --- | --- | --- |
|
|
474
|
-
| **47** | **52** | **10.1** | **16** | No |
|
|
475
|
-
|
|
476
|
-
"xs""sm""md""lg""xl""none""spacing.000""spacing.050"Show 9 more...
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
| \- | Set object |
|
|
481
|
-
| rows |
|
|
482
|
-
|
|
483
|
-
Number of rows in the `textarea` (when set the component renders a textarea element)
|
|
484
|
-
|
|
485
|
-
numberundefined
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
| \- | Set object |
|
|
490
|
-
| srOnly |
|
|
491
|
-
|
|
492
|
-
Set **`srOnly`** to hide an element visually but still make it accessible to screen readers. It can also be set to an object of breakpoints to hide the element at specific breakpoints.
|
|
493
|
-
|
|
494
|
-
Hide on all breakpoints: `srOnly: true` Hide on specific breakpoints: `srOnly: { xs: false, sm: true, md: false, lg: true, xl: false, xxl: true }`
|
|
495
|
-
|
|
496
|
-
boolean | Partial<Record<"base" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl", boolean>> | undefined
|
|
497
|
-
|
|
498
|
-
| \- | Set object |
|
|
499
|
-
| stretch |
|
|
500
|
-
|
|
501
|
-
The **`stretch`** property is used to stretch an element to fill the available space in its parent container. It sets the `height` property to `100%` and `alignSelf` to `stretch`, allowing the element to expand and contract based on the size of its parent.
|
|
502
|
-
|
|
503
|
-
booleanundefined
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
| \- | Set object |
|
|
508
|
-
| textAlign |
|
|
509
|
-
|
|
510
|
-
The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box.
|
|
511
|
-
|
|
512
|
-
| Chrome | Firefox | Safari | Edge | IE |
|
|
513
|
-
| --- | --- | --- | --- | --- |
|
|
514
|
-
| **1** | **1** | **1** | **12** | **3** |
|
|
515
|
-
|
|
516
|
-
"center" | "left" | "right" | "inherit" | "justify" | Partial<Record<"base" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl", "center" | "left" | "right" | "inherit" | "justify">> | undefined
|
|
517
|
-
|
|
518
|
-
| \- | Set object |
|
|
519
|
-
| textStyle |
|
|
520
|
-
|
|
521
|
-
Select the typography to be used using the **`textStyle`** prop. These are connected to the typography tokens in the design system.'
|
|
522
|
-
|
|
523
|
-
* `typography.body.sm` - Use for small components such as badges and disclaimers, as well as compact variations of tables and lists.
|
|
524
|
-
* `typography.body.md` - The most commonly used body text size, used for most text content in the product and the default state of all components in the design system.
|
|
525
|
-
* `typography.body.lg` - Use for tag lines, subtitles, and other large text content in the product.
|
|
526
|
-
* `typography.heading.1` - Use for the main page title to establish a clear hierarchy. There is typically only one H1 per screen, emphasising the primary purpose or context of the page.
|
|
527
|
-
* `typography.heading.2` - Use for primary section headings within a page to organise content and guide the user through key areas. Also suitable for large components—such as modals—where space allows and where it pairs well with body.md or body.lg.
|
|
528
|
-
* `typography.heading.3` - Use for sub-sections under H2s to further structure content and maintain a clear visual hierarchy. Ideal for breaking down complex sections into manageable parts.
|
|
529
|
-
* `typography.heading.4` - Use for supporting headings within content blocks or small components where space is limited—such as table headers, cards, or side panels. Provides structure without overwhelming the layout.
|
|
530
|
-
* `typography.heading.5` - Use for minor labels or titles in compact UI elements, such as cards, sidebars, or inline labels. Best used to emphasise supplementary information without drawing too much attention. Works well with body.sm and is ideal for subtle content like fine print. Use sparingly to preserve typographic hierarchy.
|
|
531
|
-
* `typography.code` - Used to display code snippets in the product, such as in the API documentation.
|
|
532
|
-
|
|
533
|
-
"typography.heading.1""typography.heading.2""typography.heading.3""typography.heading.4""typography.heading.5""typography.body.sm""typography.body.sm.regular"... 12 more ...Show 1 more...
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
| \- | Set object |
|
|
538
|
-
| value |
|
|
539
|
-
|
|
540
|
-
The value of the input. Can be a string or a number. Use for controlled inputs.
|
|
541
|
-
|
|
542
|
-
FormControlValueundefined
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
| \- | Set object |
|
|
547
|
-
| width |
|
|
548
|
-
|
|
549
|
-
The width of the input.
|
|
550
|
-
|
|
551
|
-
"2""4""6""8""10""12""16""25perc"Show 4 more...
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
| \- | Set object |
|
|
556
|
-
|
|
557
|
-
[](#examples)Examples
|
|
558
|
-
---------------------
|
|
559
|
-
|
|
560
|
-
### [](#types)Types
|
|
561
|
-
|
|
562
|
-
The input component's `type` can be set to one of the following value: `text` (default), `date`, `email`, `number`, `password`, `search`, `tel`, `url`, `time`, `color` and `file`.
|
|
563
|
-
|
|
564
|
-
For more information about each type, please see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types).
|
|
565
|
-
|
|
566
|
-
Hide code
|
|
567
|
-
|
|
568
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
569
|
-
|
|
570
|
-
<IressStack gap\="md"\>
|
|
571
|
-
<IressInput
|
|
572
|
-
placeholder\="Text input"
|
|
573
|
-
type\="text"
|
|
574
|
-
/>
|
|
575
|
-
<IressInput
|
|
576
|
-
placeholder\="Color input"
|
|
577
|
-
type\="color"
|
|
578
|
-
/>
|
|
579
|
-
<IressInput
|
|
580
|
-
placeholder\="Date input"
|
|
581
|
-
type\="date"
|
|
582
|
-
/>
|
|
583
|
-
<IressInput
|
|
584
|
-
placeholder\="Datetime-local input"
|
|
585
|
-
type\="datetime-local"
|
|
586
|
-
/>
|
|
587
|
-
<IressInput
|
|
588
|
-
placeholder\="Email input"
|
|
589
|
-
type\="email"
|
|
590
|
-
/>
|
|
591
|
-
<IressInput
|
|
592
|
-
placeholder\="File input"
|
|
593
|
-
type\="file"
|
|
594
|
-
/>
|
|
595
|
-
<IressInput
|
|
596
|
-
placeholder\="Month input"
|
|
597
|
-
type\="month"
|
|
598
|
-
/>
|
|
599
|
-
<IressInput
|
|
600
|
-
placeholder\="Number input"
|
|
601
|
-
type\="number"
|
|
602
|
-
/>
|
|
603
|
-
<IressInput
|
|
604
|
-
placeholder\="Password input"
|
|
605
|
-
type\="password"
|
|
606
|
-
/>
|
|
607
|
-
<IressInput
|
|
608
|
-
placeholder\="Search input"
|
|
609
|
-
type\="search"
|
|
610
|
-
/>
|
|
611
|
-
<IressInput
|
|
612
|
-
placeholder\="Tel input"
|
|
613
|
-
type\="tel"
|
|
614
|
-
/>
|
|
615
|
-
<IressInput
|
|
616
|
-
placeholder\="Time input"
|
|
617
|
-
type\="time"
|
|
618
|
-
/>
|
|
619
|
-
<IressInput
|
|
620
|
-
placeholder\="Url input"
|
|
621
|
-
type\="url"
|
|
622
|
-
/>
|
|
623
|
-
<IressInput
|
|
624
|
-
placeholder\="Week input"
|
|
625
|
-
type\="week"
|
|
626
|
-
/>
|
|
627
|
-
</IressStack\>
|
|
628
|
-
|
|
629
|
-
Copy
|
|
630
|
-
|
|
631
|
-
Hidden inputs
|
|
632
|
-
-------------
|
|
633
|
-
|
|
634
|
-
If you need to use a hidden input in a form, you can use a native Input element with its `type` set to `hidden`. Remember to set the `name` attribute so it can be included in form submissions.
|
|
635
|
-
|
|
636
|
-
### [](#input-modes)Input modes
|
|
637
|
-
|
|
638
|
-
The `inputmode` attribute provides a hint to browsers for devices with onscreen keyboards (usually mobile devices) to help them decide which keyboard to display when a user has selected any input or textarea element.
|
|
639
|
-
|
|
640
|
-
For more information about each mode (and their expected user experience), please see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode).
|
|
641
|
-
|
|
642
|
-
Hide code
|
|
643
|
-
|
|
644
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
645
|
-
|
|
646
|
-
<IressStack gap\="md"\>
|
|
647
|
-
<IressInput
|
|
648
|
-
inputMode\="text"
|
|
649
|
-
placeholder\="Text mode, usually best used when type="text" "
|
|
650
|
-
/>
|
|
651
|
-
<IressInput
|
|
652
|
-
inputMode\="tel"
|
|
653
|
-
placeholder\="Tel mode, usually best used when type="tel" "
|
|
654
|
-
/>
|
|
655
|
-
<IressInput
|
|
656
|
-
inputMode\="url"
|
|
657
|
-
placeholder\="Url mode, usually best used when type="url" "
|
|
658
|
-
/>
|
|
659
|
-
<IressInput
|
|
660
|
-
inputMode\="email"
|
|
661
|
-
placeholder\="Email mode, usually best used when type="email" "
|
|
662
|
-
/>
|
|
663
|
-
<IressInput
|
|
664
|
-
inputMode\="numeric"
|
|
665
|
-
placeholder\="Numeric mode, usually best used when type="numeric" "
|
|
666
|
-
/>
|
|
667
|
-
<IressInput
|
|
668
|
-
inputMode\="decimal"
|
|
669
|
-
placeholder\="Decimal mode, usually best used when type="decimal" "
|
|
670
|
-
/>
|
|
671
|
-
<IressInput
|
|
672
|
-
inputMode\="search"
|
|
673
|
-
placeholder\="Search mode, usually best used when type="search" "
|
|
674
|
-
/>
|
|
675
|
-
</IressStack\>
|
|
676
|
-
|
|
677
|
-
Copy
|
|
678
|
-
|
|
679
|
-
### [](#clearable)Clearable
|
|
680
|
-
|
|
681
|
-
By setting the `clearable` prop to `true` a clear button will appear when the user has entered a value into the input.
|
|
682
|
-
|
|
683
|
-
Clearing will set the focus on the input and trigger the `onClear` handler. Use this handler to clear the input value if your input is controlled.
|
|
684
|
-
|
|
685
|
-
Hide code
|
|
686
|
-
|
|
687
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
688
|
-
|
|
689
|
-
<IressInput
|
|
690
|
-
clearable
|
|
691
|
-
placeholder\="Search"
|
|
692
|
-
prepend\={<IressIcon name\="search" />}
|
|
693
|
-
/>
|
|
694
|
-
|
|
695
|
-
Copy
|
|
696
|
-
|
|
697
|
-
### [](#sizing)Sizing
|
|
698
|
-
|
|
699
|
-
Inputs can be resized to suit a specific number of characters. This sets an expectation of what data a user has to enter; for example using the `Sixteen` width for a credit card number.
|
|
700
|
-
|
|
701
|
-
The width in this case refers to the actual input and ensures that it is wide enough for a set number of characters. If you add any appended or prepended content, the overall size of the `IressInput` will increase.
|
|
702
|
-
|
|
703
|
-
Widths can also be set as a percentage, allowing the input to take up a proportion of the width of its container. In this case, the width of the actual input decreases if you add appended or prepended content.
|
|
704
|
-
|
|
705
|
-
Hide code
|
|
706
|
-
|
|
707
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
708
|
-
|
|
709
|
-
<IressStack gap\="md"\>
|
|
710
|
-
<IressInput
|
|
711
|
-
placeholder\="2"
|
|
712
|
-
width\="2"
|
|
713
|
-
/>
|
|
714
|
-
<IressInput
|
|
715
|
-
placeholder\="4"
|
|
716
|
-
width\="4"
|
|
717
|
-
/>
|
|
718
|
-
<IressInput
|
|
719
|
-
placeholder\="6"
|
|
720
|
-
width\="6"
|
|
721
|
-
/>
|
|
722
|
-
<IressInput
|
|
723
|
-
placeholder\="8"
|
|
724
|
-
width\="8"
|
|
725
|
-
/>
|
|
726
|
-
<IressInput
|
|
727
|
-
placeholder\="10"
|
|
728
|
-
width\="10"
|
|
729
|
-
/>
|
|
730
|
-
<IressInput
|
|
731
|
-
placeholder\="12"
|
|
732
|
-
width\="12"
|
|
733
|
-
/>
|
|
734
|
-
<IressInput
|
|
735
|
-
placeholder\="16"
|
|
736
|
-
width\="16"
|
|
737
|
-
/>
|
|
738
|
-
<IressInput
|
|
739
|
-
placeholder\="25perc"
|
|
740
|
-
width\="25perc"
|
|
741
|
-
/>
|
|
742
|
-
<IressInput
|
|
743
|
-
placeholder\="50perc"
|
|
744
|
-
width\="50perc"
|
|
745
|
-
/>
|
|
746
|
-
<IressInput
|
|
747
|
-
placeholder\="75perc"
|
|
748
|
-
width\="75perc"
|
|
749
|
-
/>
|
|
750
|
-
<IressInput
|
|
751
|
-
placeholder\="100perc"
|
|
752
|
-
width\="100perc"
|
|
753
|
-
/>
|
|
754
|
-
</IressStack\>
|
|
755
|
-
|
|
756
|
-
Copy
|
|
757
|
-
|
|
758
|
-
### [](#textareas)Textareas
|
|
759
|
-
|
|
760
|
-
You can also use `IressInput` to render a `textarea` instead of an `input`. Simply set the rows prop to the number of lines of text you'd like to display. This will set the height of the `textarea`; if a user enters more lines of text than the number of rows, a scrollbar will be displayed.
|
|
761
|
-
|
|
762
|
-
Hide code
|
|
763
|
-
|
|
764
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
765
|
-
|
|
766
|
-
<IressInput rows\={5} />
|
|
767
|
-
|
|
768
|
-
Copy
|
|
769
|
-
|
|
770
|
-
### [](#slot-props)Slot props
|
|
771
|
-
|
|
772
|
-
Content (typically icons) can be added to slots (`append` and `prepend`) within the `IressInput` component.
|
|
773
|
-
|
|
774
|
-
* **Prepend**: appears before the input
|
|
775
|
-
* **Append**: appears after the input
|
|
776
|
-
|
|
777
|
-
Hide code
|
|
778
|
-
|
|
779
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
780
|
-
|
|
781
|
-
<IressStack gap\="md"\>
|
|
782
|
-
<IressInput
|
|
783
|
-
placeholder\="Prepend slot"
|
|
784
|
-
prepend\={<IressIcon name\="search" />}
|
|
785
|
-
/>
|
|
786
|
-
<IressInput
|
|
787
|
-
append\={<IressIcon name\="search" />}
|
|
788
|
-
placeholder\="Append slot"
|
|
789
|
-
/>
|
|
790
|
-
<IressInput
|
|
791
|
-
placeholder\="Prepend slot"
|
|
792
|
-
prepend\={<IressIcon name\="search" />}
|
|
793
|
-
/>
|
|
794
|
-
<IressInput
|
|
795
|
-
append\={<IressIcon name\="search" />}
|
|
796
|
-
placeholder\="Append slot"
|
|
797
|
-
/>
|
|
798
|
-
</IressStack\>
|
|
799
|
-
|
|
800
|
-
Copy
|
|
801
|
-
|
|
802
|
-
### [](#read-only)Read only
|
|
803
|
-
|
|
804
|
-
The `readOnly` prop can be set to prevent the user from changing the value of the input. This will change the input to a custom read-only style and the user will not be able to interact with the input.
|
|
805
|
-
|
|
806
|
-
If you need more control over the read-only state (for example, rendering a stylised version of the value), you can use the [`IressReadonly` component](?path=/docs/components-readonly--docs).
|
|
807
|
-
|
|
808
|
-
Value
|
|
809
|
-
|
|
810
|
-
Hide code
|
|
811
|
-
|
|
812
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
813
|
-
|
|
814
|
-
<IressInput
|
|
815
|
-
append\=""
|
|
816
|
-
placeholder\="Enter your name"
|
|
817
|
-
prepend\=""
|
|
818
|
-
readOnly
|
|
819
|
-
value\="Value"
|
|
820
|
-
/>
|
|
821
|
-
|
|
822
|
-
Copy
|
|
823
|
-
|
|
824
|
-
### [](#formatter)Formatter
|
|
825
|
-
|
|
826
|
-
`formatter` allows you to display the value in a different format when the input is not focused. A typical use case is to format a string with currency symbols and commas.
|
|
827
|
-
|
|
828
|
-
This prop powers the `IressInputCurrency` component to allow friendly and consistent currency display in Iress products.
|
|
829
|
-
|
|
830
|
-
**Notes:**
|
|
831
|
-
|
|
832
|
-
* When `formatter` is set, the `type` of the input is changed to `text` when not in focus. Keep this in mind when you are testing the component. If you have set the `type` to number and have set a `formatter`, the role of the input will be `textbox` when not in focus, but `spinbutton` when in focus.
|
|
833
|
-
* The value of the native input will be the formatted value, not the raw value. If you need the raw value, you can use the `onChange` prop to capture the raw value.
|
|
834
|
-
|
|
835
|
-
The example below changes the value entered to uppercase when the input is not focused.
|
|
836
|
-
|
|
837
|
-
Hide code
|
|
838
|
-
|
|
839
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
840
|
-
|
|
841
|
-
<IressInput
|
|
842
|
-
append\=""
|
|
843
|
-
formatter\={(value) \=> value ? value.toString().toUpperCase() : ""}
|
|
844
|
-
placeholder\="Enter a string and it will show in UPPERCASE when not focused, and show the raw value on focus"
|
|
845
|
-
prepend\=""
|
|
846
|
-
/>
|
|
847
|
-
|
|
848
|
-
Copy
|
|
849
|
-
|
|
850
|
-
### [](#onchange-and-oninput)`onChange` and `onInput`
|
|
851
|
-
|
|
852
|
-
As of version 5, the `onChange` and `onInput` events are now consistent with how React handles the events. This means that the `onChange` event will fire at the same time as `onInput`.
|
|
853
|
-
|
|
854
|
-
On this page
|
|
855
|
-
|
|
856
|
-
* [Overview](#overview)
|
|
857
|
-
* [Props](#props)
|
|
858
|
-
* [Examples](#examples)
|
|
859
|
-
* [Types](#types)
|
|
860
|
-
* [Input modes](#input-modes)
|
|
861
|
-
* [Clearable](#clearable)
|
|
862
|
-
* [Sizing](#sizing)
|
|
863
|
-
* [Textareas](#textareas)
|
|
864
|
-
* [Slot props](#slot-props)
|
|
865
|
-
* [Read only](#read-only)
|
|
866
|
-
* [Formatter](#formatter)
|
|
867
|
-
* [onChange and onInput](#onchange-and-oninput)
|