@iress-oss/ids-mcp-server 6.0.0-alpha.1-canary-20251204032753-fe18cab → 6.0.0-alpha.1-canary-20251204040305-3639454
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/generated/docs/components_components-alert-docs.md +1054 -0
- package/generated/docs/components_components-autocomplete-docs.md +3304 -0
- package/generated/docs/components_components-autocomplete-recipes-docs.md +98 -0
- package/generated/docs/components_components-badge-docs.md +312 -0
- package/generated/docs/components_components-button-docs.md +2339 -0
- package/generated/docs/components_components-buttongroup-docs.md +980 -0
- package/generated/docs/components_components-card-docs.md +1970 -0
- package/generated/docs/components_components-checkbox-docs.md +1083 -0
- package/generated/docs/components_components-checkboxgroup-docs.md +1597 -0
- package/generated/docs/components_components-checkboxgroup-recipes-docs.md +209 -0
- package/generated/docs/components_components-col-docs.md +755 -0
- package/generated/docs/components_components-container-docs.md +172 -0
- package/generated/docs/components_components-divider-docs.md +235 -0
- package/generated/docs/components_components-expander-docs.md +428 -0
- package/generated/docs/components_components-field-docs.md +3345 -0
- package/generated/docs/components_components-filter-docs.md +4091 -0
- package/generated/docs/components_components-hide-docs.md +450 -0
- package/generated/docs/components_components-icon-docs.md +1017 -0
- package/generated/docs/components_components-image-docs.md +168 -0
- package/generated/docs/components_components-inline-docs.md +1962 -0
- package/generated/docs/components_components-input-docs.md +1388 -0
- package/generated/docs/components_components-input-recipes-docs.md +349 -0
- package/generated/docs/components_components-inputcurrency-docs.md +636 -0
- package/generated/docs/components_components-inputcurrency-recipes-docs.md +208 -0
- package/generated/docs/components_components-introduction-docs.md +448 -0
- package/generated/docs/components_components-label-docs.md +229 -0
- package/generated/docs/components_components-link-docs.md +454 -0
- package/generated/docs/components_components-menu-docs.md +2219 -0
- package/generated/docs/components_components-menu-menuitem-docs.md +1455 -0
- package/generated/docs/components_components-modal-docs.md +2002 -0
- package/generated/docs/components_components-panel-docs.md +342 -0
- package/generated/docs/components_components-placeholder-docs.md +98 -0
- package/generated/docs/components_components-popover-docs.md +1631 -0
- package/generated/docs/components_components-popover-recipes-docs.md +537 -0
- package/generated/docs/components_components-progress-docs.md +128 -0
- package/generated/docs/components_components-provider-docs.md +123 -0
- package/generated/docs/components_components-radio-docs.md +499 -0
- package/generated/docs/components_components-radiogroup-docs.md +1573 -0
- package/generated/docs/components_components-readonly-docs.md +277 -0
- package/generated/docs/components_components-richselect-docs.md +6101 -0
- package/generated/docs/components_components-row-docs.md +2172 -0
- package/generated/docs/components_components-select-docs.md +1110 -0
- package/generated/docs/components_components-skeleton-docs.md +467 -0
- package/generated/docs/components_components-skeleton-recipes-docs.md +110 -0
- package/generated/docs/components_components-skiplink-docs.md +220 -0
- package/generated/docs/components_components-slideout-docs.md +1910 -0
- package/generated/docs/components_components-slider-docs.md +1284 -0
- package/generated/docs/components_components-spinner-docs.md +90 -0
- package/generated/docs/components_components-stack-docs.md +730 -0
- package/generated/docs/components_components-table-docs.md +4038 -0
- package/generated/docs/components_components-tabset-docs.md +955 -0
- package/generated/docs/components_components-tabset-tab-docs.md +342 -0
- package/generated/docs/components_components-tag-docs.md +410 -0
- package/generated/docs/components_components-text-docs.md +593 -0
- package/generated/docs/components_components-toaster-docs.md +451 -0
- package/generated/docs/components_components-toggle-docs.md +513 -0
- package/generated/docs/components_components-tooltip-docs.md +564 -0
- package/generated/docs/components_components-validationmessage-docs.md +608 -0
- package/generated/docs/components_contact-us-docs.md +9 -0
- package/generated/docs/components_foundations-accessibility-docs.md +33 -0
- package/generated/docs/components_foundations-consistency-docs.md +44 -0
- package/generated/docs/components_foundations-content-docs.md +18 -0
- package/generated/docs/components_foundations-introduction-docs.md +17 -0
- package/generated/docs/components_foundations-principles-docs.md +60 -0
- package/generated/docs/components_foundations-responsive-layout-docs.md +2692 -0
- package/generated/docs/components_foundations-user-experience-docs.md +53 -0
- package/generated/docs/components_foundations-visual-design-docs.md +39 -0
- package/generated/docs/components_foundations-z-index-stacking-docs.md +288 -0
- package/generated/docs/components_frequently-asked-questions-docs.md +44 -0
- package/generated/docs/components_get-started-develop-docs.md +47 -0
- package/generated/docs/components_get-started-using-storybook-docs.md +55 -0
- package/generated/docs/components_introduction-docs.md +85 -0
- package/generated/docs/components_patterns-form-docs.md +2469 -0
- package/generated/docs/components_patterns-form-recipes-docs.md +1597 -0
- package/generated/docs/components_patterns-introduction-docs.md +31 -0
- package/generated/docs/components_patterns-loading-docs.md +1908 -0
- package/generated/docs/components_patterns-shadow-docs.md +195 -0
- package/generated/docs/components_resources-code-katas-docs.md +25 -0
- package/generated/docs/components_resources-introduction-docs.md +28 -0
- package/generated/docs/components_resources-mcp-server-docs.md +23 -0
- package/generated/docs/components_resources-migration-guides-from-v4-to-v5-docs.md +142 -0
- package/generated/docs/components_styling-props-colour-docs.md +91 -0
- package/generated/docs/components_styling-props-elevation-docs.md +69 -0
- package/generated/docs/components_styling-props-radius-docs.md +63 -0
- package/generated/docs/components_styling-props-reference-docs.md +160 -0
- package/generated/docs/components_styling-props-screen-readers-docs.md +66 -0
- package/generated/docs/components_styling-props-sizing-docs.md +217 -0
- package/generated/docs/components_styling-props-spacing-docs.md +545 -0
- package/generated/docs/components_styling-props-typography-docs.md +66 -0
- package/generated/docs/components_versions-docs.md +14 -0
- package/generated/docs/guidelines.md +3083 -0
- package/generated/docs/introduction-docs.md +37 -0
- package/generated/docs/tokens_colour-docs.md +479 -0
- package/generated/docs/tokens_elevation-docs.md +39 -0
- package/generated/docs/tokens_introduction-docs.md +150 -0
- package/generated/docs/tokens_radius-docs.md +67 -0
- package/generated/docs/tokens_spacing-docs.md +87 -0
- package/generated/docs/tokens_typography-docs.md +305 -0
- package/package.json +2 -2
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
Label
|
|
2
|
+
=====
|
|
3
|
+
|
|
4
|
+
Overview
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
Use the `IressLabel` component when building bespoke form inputs and `IressField` is too restrictive.
|
|
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
|
+
[](./iframe.html?id=components-label--default)
|
|
18
|
+
|
|
19
|
+
**This is a label**
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
<IressLabel\>
|
|
24
|
+
This is a label
|
|
25
|
+
</IressLabel\>
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Props
|
|
30
|
+
-----
|
|
31
|
+
|
|
32
|
+
| Name | Description | Default | Control |
|
|
33
|
+
| --- | --- | --- | --- |
|
|
34
|
+
| children\* |
|
|
35
|
+
Content to be displayed in the label. This can also include error messages to make sure it makes sense in this context.
|
|
36
|
+
|
|
37
|
+
ReactNode
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
| \- |
|
|
42
|
+
|
|
43
|
+
"This is a label"
|
|
44
|
+
|
|
45
|
+
|
|
|
46
|
+
| htmlFor |
|
|
47
|
+
|
|
48
|
+
Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
|
|
49
|
+
|
|
50
|
+
[Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
|
|
51
|
+
|
|
52
|
+
THtmlFor
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
| \- | Set object |
|
|
57
|
+
|
|
58
|
+
Examples
|
|
59
|
+
--------
|
|
60
|
+
|
|
61
|
+
### Required
|
|
62
|
+
|
|
63
|
+
To indicate that an input is required, you may use the `required` prop to distinguish the label with an asterix.
|
|
64
|
+
|
|
65
|
+
[](./iframe.html?id=components-label--required)
|
|
66
|
+
|
|
67
|
+
**\*RequiredThis is a label for a required input**
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
<IressLabel required\>
|
|
72
|
+
This is a label for a required input
|
|
73
|
+
</IressLabel\>
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### Props
|
|
78
|
+
|
|
79
|
+
| Name | Description | Default | Control |
|
|
80
|
+
| --- | --- | --- | --- |
|
|
81
|
+
| children\* |
|
|
82
|
+
Content to be displayed in the label. This can also include error messages to make sure it makes sense in this context.
|
|
83
|
+
|
|
84
|
+
ReactNode
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
| \- |
|
|
89
|
+
|
|
90
|
+
"This is a label for a required input"
|
|
91
|
+
|
|
92
|
+
|
|
|
93
|
+
| htmlFor |
|
|
94
|
+
|
|
95
|
+
Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
|
|
96
|
+
|
|
97
|
+
[Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
|
|
98
|
+
|
|
99
|
+
THtmlFor
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
| \- | Set object |
|
|
104
|
+
| required |
|
|
105
|
+
|
|
106
|
+
boolean
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
| \- | FalseTrue |
|
|
111
|
+
|
|
112
|
+
### Hidden label
|
|
113
|
+
|
|
114
|
+
Sometimes you may wish to have an input with no visible label, but to still wrap the input in a label for accessibility. In this case, set `hiddenLabel` to `true`.
|
|
115
|
+
|
|
116
|
+
[](./iframe.html?id=components-label--hidden-label)
|
|
117
|
+
|
|
118
|
+
**This text is visible to screen readers only**
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
<IressLabel hiddenLabel\>
|
|
123
|
+
This text is visible to screen readers only
|
|
124
|
+
</IressLabel\>
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### Props
|
|
129
|
+
|
|
130
|
+
| Name | Description | Default | Control |
|
|
131
|
+
| --- | --- | --- | --- |
|
|
132
|
+
| children\* |
|
|
133
|
+
Content to be displayed in the label. This can also include error messages to make sure it makes sense in this context.
|
|
134
|
+
|
|
135
|
+
ReactNode
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
| \- |
|
|
140
|
+
|
|
141
|
+
"This text is visible to screen readers only"
|
|
142
|
+
|
|
143
|
+
|
|
|
144
|
+
| hiddenLabel |
|
|
145
|
+
|
|
146
|
+
boolean
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
| \- | FalseTrue |
|
|
151
|
+
| htmlFor |
|
|
152
|
+
|
|
153
|
+
Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
|
|
154
|
+
|
|
155
|
+
[Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
|
|
156
|
+
|
|
157
|
+
THtmlFor
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
| \- | Set object |
|
|
162
|
+
|
|
163
|
+
### Rich content
|
|
164
|
+
|
|
165
|
+
You can render custom content into the label.
|
|
166
|
+
|
|
167
|
+
[](./iframe.html?id=components-label--rich-content)
|
|
168
|
+
|
|
169
|
+
**
|
|
170
|
+
|
|
171
|
+
Home settings
|
|
172
|
+
|
|
173
|
+
**
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
<IressLabel\>
|
|
178
|
+
<IressInline
|
|
179
|
+
gap\="md"
|
|
180
|
+
verticalAlign\="middle"
|
|
181
|
+
\>
|
|
182
|
+
<IressIcon name\="home" />
|
|
183
|
+
Home settings <IressIcon name\="cog" />
|
|
184
|
+
</IressInline\>
|
|
185
|
+
</IressLabel\>
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
#### Props
|
|
190
|
+
|
|
191
|
+
| Name | Description | Default | Control |
|
|
192
|
+
| --- | --- | --- | --- |
|
|
193
|
+
| children\* |
|
|
194
|
+
Content to be displayed in the label. This can also include error messages to make sure it makes sense in this context.
|
|
195
|
+
|
|
196
|
+
ReactNode
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
| \- | \- |
|
|
201
|
+
| hiddenLabel |
|
|
202
|
+
|
|
203
|
+
boolean
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
| \- | FalseTrue |
|
|
208
|
+
| htmlFor |
|
|
209
|
+
|
|
210
|
+
Used to connect it to the input element, it should be the input's id. If provided, the label will be rendered as a `<label>` element, otherwise it will be rendered as a `<strong>` element.
|
|
211
|
+
|
|
212
|
+
[Learn more](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/for)
|
|
213
|
+
|
|
214
|
+
THtmlFor
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
| \- | Set object |
|
|
219
|
+
|
|
220
|
+
Accessibility
|
|
221
|
+
-------------
|
|
222
|
+
|
|
223
|
+
Don't place interactive elements such as anchors or buttons inside the `IressLabel`. Doing so makes it difficult for people to activate the form input associated with the label.
|
|
224
|
+
|
|
225
|
+
See the [MDN Label Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#accessibility_concerns) for more info.
|
|
226
|
+
|
|
227
|
+
### Labelling non-interactive content
|
|
228
|
+
|
|
229
|
+
`IressLabel` can be used to label non-interactive content, such as readonly data. In this case, do not provide a `htmlFor` prop. This will render the label using a `strong` tag instead of a `label` tag.
|
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
Link
|
|
2
|
+
====
|
|
3
|
+
|
|
4
|
+
Overview
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
A link is used to navigate to another page or location.
|
|
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
|
+
[](./iframe.html?id=components-link--default)
|
|
18
|
+
|
|
19
|
+
Hello, I am a paragraph with an [IressLink](//iress.com) inside.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
<IressPanel\>
|
|
24
|
+
Hello, I am a paragraph with an{' '}
|
|
25
|
+
<IressLink href\="//iress.com"\>
|
|
26
|
+
IressLink </IressLink\>
|
|
27
|
+
{' '}inside.
|
|
28
|
+
</IressPanel\>
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Props
|
|
33
|
+
-----
|
|
34
|
+
|
|
35
|
+
| Name | Description | Default | Control |
|
|
36
|
+
| --- | --- | --- | --- |
|
|
37
|
+
| active |
|
|
38
|
+
Sets the active state of the link, usually used to indicate the link has activated a modal, popover or slideout.
|
|
39
|
+
|
|
40
|
+
boolean
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
| \- | Set boolean |
|
|
45
|
+
| append |
|
|
46
|
+
|
|
47
|
+
Content for the append slot.
|
|
48
|
+
|
|
49
|
+
ReactNode
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
| \- | Set object |
|
|
54
|
+
| children |
|
|
55
|
+
|
|
56
|
+
Content is placed between prepend and append if provided. Used to describe the expected intention of this link.
|
|
57
|
+
|
|
58
|
+
ReactNode
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
| \- |
|
|
63
|
+
|
|
64
|
+
"IressLink"
|
|
65
|
+
|
|
66
|
+
|
|
|
67
|
+
| element |
|
|
68
|
+
|
|
69
|
+
Change the component that will be rendered as the link, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
70
|
+
|
|
71
|
+
C
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
| \- | Set object |
|
|
76
|
+
| href |
|
|
77
|
+
|
|
78
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
|
|
79
|
+
|
|
80
|
+
THref
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
| \- |
|
|
85
|
+
|
|
86
|
+
"//iress.com"
|
|
87
|
+
|
|
88
|
+
|
|
|
89
|
+
| loading |
|
|
90
|
+
|
|
91
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
92
|
+
|
|
93
|
+
union
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
|
98
|
+
|
|
99
|
+
false
|
|
100
|
+
|
|
101
|
+
| Set object |
|
|
102
|
+
| onClick |
|
|
103
|
+
|
|
104
|
+
Emitted when the menu item is clicked.
|
|
105
|
+
|
|
106
|
+
MouseEventHandler
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
| \- | Set object |
|
|
111
|
+
| prepend |
|
|
112
|
+
|
|
113
|
+
Content for the prepend slot.
|
|
114
|
+
|
|
115
|
+
ReactNode
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
| \- | Set object |
|
|
120
|
+
|
|
121
|
+
Usage
|
|
122
|
+
-----
|
|
123
|
+
|
|
124
|
+
`IressLink` is an alternative to the `IressButton` component, and is used when you want to add interactive text inside a block of static text.
|
|
125
|
+
|
|
126
|
+
If you provide a `href`, it will render as an `<a />` element. Otherwise it will render as a `<button />` element. This helps ensure it presents the correct role to assistive technologies for the best accessibility.
|
|
127
|
+
|
|
128
|
+
When to use
|
|
129
|
+
-----------
|
|
130
|
+
|
|
131
|
+
* If you want to include a link alongside static text, use the `IressLink` component.
|
|
132
|
+
* If you want to have a call to action at the start or end of a block of contents, use the `IressButton` component instead.
|
|
133
|
+
|
|
134
|
+
Examples
|
|
135
|
+
--------
|
|
136
|
+
|
|
137
|
+
### Loading
|
|
138
|
+
|
|
139
|
+
Loading buttons give the user an indication something is happening (eg. a form submission or extra content being loaded) after they have been triggered.
|
|
140
|
+
|
|
141
|
+
The loading state can be activated by setting the `loading` prop to `true` and providing some `loadingText` for screenreaders to announce when in loading state (which defaults to Loading...).
|
|
142
|
+
|
|
143
|
+
When the loading state is activated, any click events on the link are disabled.
|
|
144
|
+
|
|
145
|
+
[](./iframe.html?id=components-link--loading)
|
|
146
|
+
|
|
147
|
+
Link text
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
<IressLink loading\>
|
|
152
|
+
Link text
|
|
153
|
+
</IressLink\>
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### Props
|
|
158
|
+
|
|
159
|
+
| Name | Description | Default | Control |
|
|
160
|
+
| --- | --- | --- | --- |
|
|
161
|
+
| active |
|
|
162
|
+
Sets the active state of the link, usually used to indicate the link has activated a modal, popover or slideout.
|
|
163
|
+
|
|
164
|
+
boolean
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
| \- | Set boolean |
|
|
169
|
+
| append |
|
|
170
|
+
|
|
171
|
+
Content for the append slot.
|
|
172
|
+
|
|
173
|
+
ReactNode
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
| \- | Set object |
|
|
178
|
+
| children |
|
|
179
|
+
|
|
180
|
+
Content is placed between prepend and append if provided. Used to describe the expected intention of this link.
|
|
181
|
+
|
|
182
|
+
ReactNode
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
| \- |
|
|
187
|
+
|
|
188
|
+
"Link text"
|
|
189
|
+
|
|
190
|
+
|
|
|
191
|
+
| element |
|
|
192
|
+
|
|
193
|
+
Change the component that will be rendered as the link, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
194
|
+
|
|
195
|
+
C
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
| \- | Set object |
|
|
200
|
+
| href |
|
|
201
|
+
|
|
202
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
|
|
203
|
+
|
|
204
|
+
THref
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
| \- | Set object |
|
|
209
|
+
| loading |
|
|
210
|
+
|
|
211
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
212
|
+
|
|
213
|
+
union
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
|
218
|
+
|
|
219
|
+
false
|
|
220
|
+
|
|
221
|
+
|
|
|
222
|
+
|
|
223
|
+
true
|
|
224
|
+
|
|
225
|
+
|
|
|
226
|
+
| onClick |
|
|
227
|
+
|
|
228
|
+
Emitted when the menu item is clicked.
|
|
229
|
+
|
|
230
|
+
MouseEventHandler
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
| \- | Set object |
|
|
235
|
+
| prepend |
|
|
236
|
+
|
|
237
|
+
Content for the prepend slot.
|
|
238
|
+
|
|
239
|
+
ReactNode
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
| \- | Set object |
|
|
244
|
+
|
|
245
|
+
### Slot props
|
|
246
|
+
|
|
247
|
+
Use the slots to correctly position icons or badges inside buttons.
|
|
248
|
+
|
|
249
|
+
* **Prepend** - Places the element before the text
|
|
250
|
+
* **Append** - Places the element after the text
|
|
251
|
+
|
|
252
|
+
[](./iframe.html?id=components-link--slots)
|
|
253
|
+
|
|
254
|
+
Prepend iconAppend icon
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
<IressInline gap\="md"\>
|
|
259
|
+
<IressLink prepend\={<IressIcon name\="home" />}\>
|
|
260
|
+
Prepend icon </IressLink\>
|
|
261
|
+
<IressLink append\={<IressIcon name\="home" />}\>
|
|
262
|
+
Append icon </IressLink\>
|
|
263
|
+
</IressInline\>
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
#### Props
|
|
268
|
+
|
|
269
|
+
| Name | Description | Default | Control |
|
|
270
|
+
| --- | --- | --- | --- |
|
|
271
|
+
| active |
|
|
272
|
+
Sets the active state of the link, usually used to indicate the link has activated a modal, popover or slideout.
|
|
273
|
+
|
|
274
|
+
boolean
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
| \- | Set boolean |
|
|
279
|
+
| append |
|
|
280
|
+
|
|
281
|
+
Content for the append slot.
|
|
282
|
+
|
|
283
|
+
ReactNode
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
| \- | \- |
|
|
288
|
+
| children |
|
|
289
|
+
|
|
290
|
+
Content is placed between prepend and append if provided. Used to describe the expected intention of this link.
|
|
291
|
+
|
|
292
|
+
ReactNode
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
| \- | \- |
|
|
297
|
+
| element |
|
|
298
|
+
|
|
299
|
+
Change the component that will be rendered as the link, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
300
|
+
|
|
301
|
+
C
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
| \- | Set object |
|
|
306
|
+
| href |
|
|
307
|
+
|
|
308
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
|
|
309
|
+
|
|
310
|
+
THref
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
| \- | Set object |
|
|
315
|
+
| loading |
|
|
316
|
+
|
|
317
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
318
|
+
|
|
319
|
+
union
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
|
324
|
+
|
|
325
|
+
false
|
|
326
|
+
|
|
327
|
+
| Set object |
|
|
328
|
+
| onClick |
|
|
329
|
+
|
|
330
|
+
Emitted when the menu item is clicked.
|
|
331
|
+
|
|
332
|
+
MouseEventHandler
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
| \- | Set object |
|
|
337
|
+
| prepend |
|
|
338
|
+
|
|
339
|
+
Content for the prepend slot.
|
|
340
|
+
|
|
341
|
+
ReactNode
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
| \- | \- |
|
|
346
|
+
|
|
347
|
+
### Element
|
|
348
|
+
|
|
349
|
+
You can use the `element` prop to render a custom component as the link. This is useful for rendering a component from a third-party library, such as `react-router-dom`.
|
|
350
|
+
|
|
351
|
+
[](./iframe.html?id=components-link--element)
|
|
352
|
+
|
|
353
|
+
[Iress](https://iress.com)
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
/\*\*
|
|
358
|
+
\* This could be the \`Link\` component from \`react-router-dom\` or any other routing library. \*/
|
|
359
|
+
const Link \= forwardRef<
|
|
360
|
+
HTMLAnchorElement,
|
|
361
|
+
HTMLAttributes<HTMLAnchorElement\> & { to: string }
|
|
362
|
+
\>(({ children, className, to, ...restProps }, ref) \=> (
|
|
363
|
+
<div className\={className}\>
|
|
364
|
+
<a href\={to} ref\={ref} {...restProps}\>
|
|
365
|
+
{children}
|
|
366
|
+
</a\>
|
|
367
|
+
</div\>
|
|
368
|
+
));
|
|
369
|
+
export const RoutingLink \= () \=> (
|
|
370
|
+
<IressLink element\={Link} to\="https://iress.com"\>
|
|
371
|
+
Iress </IressLink\>
|
|
372
|
+
);
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
#### Props
|
|
377
|
+
|
|
378
|
+
| Name | Description | Default | Control |
|
|
379
|
+
| --- | --- | --- | --- |
|
|
380
|
+
| active |
|
|
381
|
+
Sets the active state of the link, usually used to indicate the link has activated a modal, popover or slideout.
|
|
382
|
+
|
|
383
|
+
boolean
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
| \- | \- |
|
|
388
|
+
| append |
|
|
389
|
+
|
|
390
|
+
Content for the append slot.
|
|
391
|
+
|
|
392
|
+
ReactNode
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
| \- | \- |
|
|
397
|
+
| children |
|
|
398
|
+
|
|
399
|
+
Content is placed between prepend and append if provided. Used to describe the expected intention of this link.
|
|
400
|
+
|
|
401
|
+
ReactNode
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
| \- | \- |
|
|
406
|
+
| element |
|
|
407
|
+
|
|
408
|
+
Change the component that will be rendered as the link, used for third-party libraries that require a specific element type. By default, it will render a button or an anchor tag based on the `href` prop.
|
|
409
|
+
|
|
410
|
+
C
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
| \- | \- |
|
|
415
|
+
| href |
|
|
416
|
+
|
|
417
|
+
Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
|
|
418
|
+
|
|
419
|
+
THref
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
| \- | \- |
|
|
424
|
+
| loading |
|
|
425
|
+
|
|
426
|
+
When true, button is in loading state. If provided a string, will be used as the loading text for screen readers.
|
|
427
|
+
|
|
428
|
+
union
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
|
433
|
+
|
|
434
|
+
false
|
|
435
|
+
|
|
436
|
+
| \- |
|
|
437
|
+
| onClick |
|
|
438
|
+
|
|
439
|
+
Emitted when the menu item is clicked.
|
|
440
|
+
|
|
441
|
+
MouseEventHandler
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
| \- | \- |
|
|
446
|
+
| prepend |
|
|
447
|
+
|
|
448
|
+
Content for the prepend slot.
|
|
449
|
+
|
|
450
|
+
ReactNode
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
| \- | \- |
|