@rio-cloud/uikit-mcp 1.1.4 → 1.1.6

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.
Files changed (201) hide show
  1. package/README.md +1 -0
  2. package/dist/doc-metadata.json +188 -88
  3. package/dist/docs/components/accentBar.md +35 -3
  4. package/dist/docs/components/activity.md +14 -3
  5. package/dist/docs/components/animatedNumber.md +17 -4
  6. package/dist/docs/components/animatedTextReveal.md +54 -8
  7. package/dist/docs/components/animations.md +33 -33
  8. package/dist/docs/components/appHeader.md +65 -9
  9. package/dist/docs/components/appLayout.md +566 -61
  10. package/dist/docs/components/appNavigationBar.md +55 -3
  11. package/dist/docs/components/areaCharts.md +14 -14
  12. package/dist/docs/components/aspectRatioPlaceholder.md +11 -3
  13. package/dist/docs/components/assetTree.md +1174 -328
  14. package/dist/docs/components/autosuggests.md +2 -2
  15. package/dist/docs/components/avatar.md +25 -3
  16. package/dist/docs/components/banner.md +3 -3
  17. package/dist/docs/components/barCharts.md +38 -38
  18. package/dist/docs/components/barList.md +22 -10
  19. package/dist/docs/components/basicMap.md +2 -2
  20. package/dist/docs/components/bottomSheet.md +100 -3
  21. package/dist/docs/components/button.md +549 -36
  22. package/dist/docs/components/buttonToolbar.md +10 -3
  23. package/dist/docs/components/calendarStripe.md +127 -85
  24. package/dist/docs/components/card.md +11 -3
  25. package/dist/docs/components/carousel.md +2 -2
  26. package/dist/docs/components/chartColors.md +2 -2
  27. package/dist/docs/components/chartsGettingStarted.md +2 -2
  28. package/dist/docs/components/chat.md +3 -3
  29. package/dist/docs/components/checkbox.md +67 -45
  30. package/dist/docs/components/circularProgress.md +465 -0
  31. package/dist/docs/components/clearableInput.md +18 -18
  32. package/dist/docs/components/collapse.md +28 -4
  33. package/dist/docs/components/composedCharts.md +20 -20
  34. package/dist/docs/components/contentLoader.md +126 -105
  35. package/dist/docs/components/dataTabs.md +191 -11
  36. package/dist/docs/components/datepickers.md +735 -723
  37. package/dist/docs/components/dialogs.md +362 -2
  38. package/dist/docs/components/divider.md +15 -3
  39. package/dist/docs/components/dropdowns.md +4548 -4355
  40. package/dist/docs/components/editableContent.md +187 -3
  41. package/dist/docs/components/expander.md +52 -5
  42. package/dist/docs/components/fade.md +42 -7
  43. package/dist/docs/components/fadeExpander.md +13 -4
  44. package/dist/docs/components/fadeUp.md +22 -4
  45. package/dist/docs/components/feedback.md +44 -3
  46. package/dist/docs/components/filePickers.md +45 -3
  47. package/dist/docs/components/formLabel.md +20 -5
  48. package/dist/docs/components/groupedItemList.md +54 -3
  49. package/dist/docs/components/iconList.md +5 -5
  50. package/dist/docs/components/imagePreloader.md +7 -3
  51. package/dist/docs/components/labeledElement.md +13 -3
  52. package/dist/docs/components/licensePlate.md +11 -3
  53. package/dist/docs/components/lineCharts.md +10 -10
  54. package/dist/docs/components/listMenu.md +78 -8
  55. package/dist/docs/components/loadMore.md +29 -3
  56. package/dist/docs/components/mainNavigation.md +5 -5
  57. package/dist/docs/components/mapCircle.md +2 -2
  58. package/dist/docs/components/mapCluster.md +2 -2
  59. package/dist/docs/components/mapContext.md +2 -2
  60. package/dist/docs/components/mapDraggableMarker.md +2 -2
  61. package/dist/docs/components/mapGettingStarted.md +2 -2
  62. package/dist/docs/components/mapInfoBubble.md +2 -2
  63. package/dist/docs/components/mapLayerGroup.md +2 -2
  64. package/dist/docs/components/mapMarker.md +2 -2
  65. package/dist/docs/components/mapPolygon.md +2 -2
  66. package/dist/docs/components/mapRoute.md +2 -2
  67. package/dist/docs/components/mapRouteGenerator.md +2 -2
  68. package/dist/docs/components/mapSettings.md +9 -9
  69. package/dist/docs/components/mapUtils.md +2 -2
  70. package/dist/docs/components/multiselects.md +2 -2
  71. package/dist/docs/components/noData.md +23 -3
  72. package/dist/docs/components/notifications.md +2 -2
  73. package/dist/docs/components/numbercontrol.md +54 -5
  74. package/dist/docs/components/onboarding.md +26 -2
  75. package/dist/docs/components/page.md +33 -3
  76. package/dist/docs/components/pager.md +15 -3
  77. package/dist/docs/components/pieCharts.md +89 -78
  78. package/dist/docs/components/popover.md +40 -2
  79. package/dist/docs/components/position.md +11 -3
  80. package/dist/docs/components/radialBarCharts.md +2054 -2012
  81. package/dist/docs/components/radioCardGroup.md +487 -0
  82. package/dist/docs/components/radiobutton.md +138 -10
  83. package/dist/docs/components/releaseNotes.md +19 -2
  84. package/dist/docs/components/resizer.md +14 -3
  85. package/dist/docs/components/responsiveColumnStripe.md +20 -3
  86. package/dist/docs/components/responsiveVideo.md +12 -3
  87. package/dist/docs/components/rioglyph.md +13 -3
  88. package/dist/docs/components/rules.md +95 -5
  89. package/dist/docs/components/saveableInput.md +400 -276
  90. package/dist/docs/components/selects.md +2 -2
  91. package/dist/docs/components/sidebar.md +39 -3
  92. package/dist/docs/components/sliders.md +38 -3
  93. package/dist/docs/components/smoothScrollbars.md +93 -3
  94. package/dist/docs/components/spinners.md +51 -3
  95. package/dist/docs/components/states.md +217 -2
  96. package/dist/docs/components/statsWidgets.md +123 -3
  97. package/dist/docs/components/statusBar.md +29 -3
  98. package/dist/docs/components/stepButton.md +9 -3
  99. package/dist/docs/components/steppedProgressBars.md +67 -3
  100. package/dist/docs/components/subNavigation.md +24 -17
  101. package/dist/docs/components/supportMarker.md +2 -2
  102. package/dist/docs/components/svgImage.md +13 -3
  103. package/dist/docs/components/switch.md +218 -82
  104. package/dist/docs/components/tables.md +2 -2
  105. package/dist/docs/components/tagManager.md +56 -2
  106. package/dist/docs/components/tags.md +33 -3
  107. package/dist/docs/components/teaser.md +30 -3
  108. package/dist/docs/components/textTruncateMiddle.md +151 -0
  109. package/dist/docs/components/timeline.md +2 -2
  110. package/dist/docs/components/timepicker.md +687 -63
  111. package/dist/docs/components/toggleButton.md +96 -10
  112. package/dist/docs/components/tooltip.md +30 -21
  113. package/dist/docs/components/tracker.md +631 -0
  114. package/dist/docs/components/virtualList.md +107 -84
  115. package/dist/docs/foundations.md +647 -275
  116. package/dist/docs/start/changelog.md +2 -738
  117. package/dist/docs/start/goodtoknow.md +2 -2
  118. package/dist/docs/start/guidelines/color-combinations.md +2 -2
  119. package/dist/docs/start/guidelines/custom-css.md +2 -2
  120. package/dist/docs/start/guidelines/custom-rioglyph.md +2 -2
  121. package/dist/docs/start/guidelines/formatting.md +2 -2
  122. package/dist/docs/start/guidelines/iframe.md +2 -2
  123. package/dist/docs/start/guidelines/obfuscate-data.md +2 -2
  124. package/dist/docs/start/guidelines/print-css.md +2 -2
  125. package/dist/docs/start/guidelines/spinner.md +82 -82
  126. package/dist/docs/start/guidelines/state-in-url.md +263 -0
  127. package/dist/docs/start/guidelines/supported-browsers.md +2 -2
  128. package/dist/docs/start/guidelines/writing.md +2 -2
  129. package/dist/docs/start/howto.md +10 -10
  130. package/dist/docs/start/intro.md +2 -2
  131. package/dist/docs/start/responsiveness.md +2 -2
  132. package/dist/docs/templates/common-table.md +15 -14
  133. package/dist/docs/templates/detail-views.md +3 -3
  134. package/dist/docs/templates/expandable-details.md +2 -2
  135. package/dist/docs/templates/feature-cards.md +56 -56
  136. package/dist/docs/templates/form-summary.md +23 -23
  137. package/dist/docs/templates/form-toggle.md +2 -2
  138. package/dist/docs/templates/list-blocks.md +204 -204
  139. package/dist/docs/templates/loading-progress.md +2 -2
  140. package/dist/docs/templates/options-panel.md +2 -2
  141. package/dist/docs/templates/panel-variants.md +2 -2
  142. package/dist/docs/templates/progress-cards.md +2 -2
  143. package/dist/docs/templates/progress-success.md +2 -2
  144. package/dist/docs/templates/settings-form.md +24 -24
  145. package/dist/docs/templates/stats-blocks.md +18 -18
  146. package/dist/docs/templates/table-panel.md +2 -2
  147. package/dist/docs/templates/table-row-animation.md +2 -2
  148. package/dist/docs/templates/usage-cards.md +2 -2
  149. package/dist/docs/utilities/classNames.md +191 -0
  150. package/dist/docs/utilities/deviceUtils.md +2 -2
  151. package/dist/docs/utilities/featureToggles.md +2 -2
  152. package/dist/docs/utilities/fuelTypeUtils.md +2 -2
  153. package/dist/docs/utilities/routeUtils.md +326 -90
  154. package/dist/docs/utilities/useAfterMount.md +2 -2
  155. package/dist/docs/utilities/useAutoAnimate.md +2 -2
  156. package/dist/docs/utilities/useAverage.md +2 -2
  157. package/dist/docs/utilities/useClickOutside.md +2 -2
  158. package/dist/docs/utilities/useClipboard.md +3 -3
  159. package/dist/docs/utilities/useCookies.md +188 -0
  160. package/dist/docs/utilities/useCount.md +2 -2
  161. package/dist/docs/utilities/useDarkMode.md +2 -2
  162. package/dist/docs/utilities/useDebugInfo.md +5 -5
  163. package/dist/docs/utilities/useEffectOnce.md +2 -2
  164. package/dist/docs/utilities/useElapsedTime.md +2 -2
  165. package/dist/docs/utilities/useElementSize.md +2 -2
  166. package/dist/docs/utilities/useEsc.md +2 -2
  167. package/dist/docs/utilities/useEvent.md +2 -2
  168. package/dist/docs/utilities/useFocusTrap.md +2 -2
  169. package/dist/docs/utilities/useFullscreen.md +2 -2
  170. package/dist/docs/utilities/useHover.md +2 -2
  171. package/dist/docs/utilities/useIncomingPostMessages.md +2 -2
  172. package/dist/docs/utilities/useInterval.md +2 -2
  173. package/dist/docs/utilities/useIsFocusWithin.md +2 -2
  174. package/dist/docs/utilities/useKey.md +2 -2
  175. package/dist/docs/utilities/useLocalStorage.md +2 -2
  176. package/dist/docs/utilities/useLocationSuggestions.md +2 -2
  177. package/dist/docs/utilities/useMax.md +2 -2
  178. package/dist/docs/utilities/useMin.md +2 -2
  179. package/dist/docs/utilities/useMutationObserver.md +2 -2
  180. package/dist/docs/utilities/useOnScreen.md +2 -2
  181. package/dist/docs/utilities/useOnlineStatus.md +2 -2
  182. package/dist/docs/utilities/usePostMessage.md +3 -3
  183. package/dist/docs/utilities/usePostMessageSender.md +2 -2
  184. package/dist/docs/utilities/usePrevious.md +2 -2
  185. package/dist/docs/utilities/useResizeObserver.md +2 -2
  186. package/dist/docs/utilities/useRioCookieConsent.md +90 -0
  187. package/dist/docs/utilities/useScrollPosition.md +2 -2
  188. package/dist/docs/utilities/useSearch.md +2 -2
  189. package/dist/docs/utilities/useSearchHighlight.md +815 -0
  190. package/dist/docs/utilities/useSorting.md +2 -2
  191. package/dist/docs/utilities/useStateWithValidation.md +2 -2
  192. package/dist/docs/utilities/useSum.md +2 -2
  193. package/dist/docs/utilities/useTableExport.md +53 -53
  194. package/dist/docs/utilities/useTableSelection.md +90 -90
  195. package/dist/docs/utilities/useTimeout.md +2 -2
  196. package/dist/docs/utilities/useToggle.md +3 -3
  197. package/dist/docs/utilities/useUrlState.md +418 -0
  198. package/dist/docs/utilities/useWindowResize.md +2 -2
  199. package/dist/index.mjs +8 -8
  200. package/dist/version.json +2 -2
  201. package/package.json +9 -9
@@ -2,8 +2,8 @@
2
2
 
3
3
  *Category:* Components
4
4
  *Section:* Interaction
5
- *Source:* https://uikit.developers.rio.cloud/#components/button
6
- *Captured:* 2026-01-14T09:07:00.083Z
5
+ *Source:* https://uikit.developers.rio.cloud/#/components/button
6
+ *Captured:* 2026-02-23T13:41:39.366Z
7
7
 
8
8
  The button component is the React equivalent to the normal HTML button with some To check out the HTML version click here: Buttons
9
9
 
@@ -251,31 +251,74 @@ export default () => (
251
251
  </div>
252
252
  ```
253
253
 
254
- #### Props
254
+ #### Props: Base button props
255
+
256
+ ### Base button props
257
+
258
+ | Name | Type | Default | Description |
259
+ | --- | --- | --- | --- |
260
+ | disabled | boolean | false | Whether the button should be disabled. |
261
+ | active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
262
+ | iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
263
+ | iconRight | boolean | false | Adds right side spacing for an icon. This should be used when having navigation buttons that use an icon on the right side. |
264
+ | iconName | string | — | Optional rio-glyph icon name that comes in handy for icon only buttons for not adding a span tag for the icon which reduces boilerplate code. |
265
+ | multiline | boolean | false | Defines whether the button text break into multiple lines when the button space exceeds. Multiline buttons should be used as exception only. |
266
+ | block | boolean | false | Defines whether the button takes up the full width of the parent element. |
267
+ | bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
268
+ | bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
269
+ | variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
270
+ | noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
271
+ | tabIndex | number | 0 | Number of the index used for keyboard support. |
272
+ | className | string | — | Additional classes to be set on the button element. |
273
+
274
+ #### Props: Regular button
275
+
276
+ ### Regular button
255
277
 
256
278
  | Name | Type | Default | Description |
257
279
  | --- | --- | --- | --- |
258
- | bsStyle | | | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
259
- | bsSize | | | Sets the button size. Possible values are: xs, sm, md and lg |
260
- | variant | | | Sets the button variant. Possible values are: link, link-inline, outline and action |
280
+ | asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
281
+ | onClick | (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | | Callback function triggered when clicking the button. |
282
+ | type | 'button' \| 'submit | 'button' | Defines the type of the button. This may be used for form submit buttons. |
261
283
 
262
- ### Example: Link buttons
284
+ #### Props: ToggleButton
285
+
286
+ ### ToggleButton
287
+
288
+ | Name | Type | Default | Description |
289
+ | --- | --- | --- | --- |
290
+ | asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
291
+ | onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
263
292
 
264
- Link buttons
293
+ #### Props: Link element buttons
294
+
295
+ ### Link element buttons
296
+
297
+ | Name | Type | Default | Description |
298
+ | --- | --- | --- | --- |
299
+ | as | 'a' | — | Defines this component as a link element. |
300
+ | type | never | — | Native button type is not supported when using as="a". |
301
+ | href | string | — | Defines the destination URL for the link button. |
302
+ | asToggle | false | false | Toggle behavior is not supported when using as="a". |
303
+ | onClick | (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | — | Callback function triggered when clicking the link. |
304
+
305
+ ### Example: Buttons with link styles
306
+
307
+ Buttons with link styles
265
308
  PrimarySuccessInfoWarningDanger
266
- Link inline buttons
309
+ Button with link styles - inline
267
310
 
268
311
  This is an example for an Inline link button.
269
- Note Link buttons can also be used within text blocks by setting the variant type to Button.VARIANT_LINK_INLINE.
312
+ Note Link styled buttons can also be used within text blocks by setting the variant type to Button.VARIANT_LINK_INLINE.
270
313
 
271
314
  #### Summary
272
315
 
273
- Link buttons
316
+ Buttons with link styles
274
317
  PrimarySuccessInfoWarningDanger
275
- Link inline buttons
318
+ Button with link styles - inline
276
319
 
277
320
  This is an example for an Inline link button.
278
- Note Link buttons can also be used within text blocks by setting the variant type to Button.VARIANT_LINK_INLINE.
321
+ Note Link styled buttons can also be used within text blocks by setting the variant type to Button.VARIANT_LINK_INLINE.
279
322
 
280
323
  #### React (tsx)
281
324
 
@@ -286,7 +329,7 @@ import FormLabel from '@rio-cloud/rio-uikit/FormLabel';
286
329
 
287
330
  export default () => (
288
331
  <div>
289
- <FormLabel>Link buttons</FormLabel>
332
+ <FormLabel>Buttons with link styles</FormLabel>
290
333
  <ButtonToolbar>
291
334
  <Button bsStyle={Button.PRIMARY} variant={Button.VARIANT_LINK} iconName='rioglyph-heart'>
292
335
  Primary
@@ -305,7 +348,7 @@ export default () => (
305
348
  </Button>
306
349
  </ButtonToolbar>
307
350
  <div>
308
- <FormLabel className='margin-top-25'>Link inline buttons</FormLabel>
351
+ <FormLabel className='margin-top-25'>Button with link styles - inline</FormLabel>
309
352
  </div>
310
353
  <div className='display-inline-flex gap-4'>
311
354
  This is an example for an{' '}
@@ -315,8 +358,9 @@ export default () => (
315
358
  button.
316
359
  </div>
317
360
  <p className='margin-top-25'>
318
- <span className='label label-info label-condensed margin-right-5'>Note</span> Link buttons can also be used
319
- within text blocks by setting the variant type to <code className='code'>Button.VARIANT_LINK_INLINE</code>.
361
+ <span className='label label-info label-condensed margin-right-5'>Note</span> Link styled buttons can also
362
+ be used within text blocks by setting the variant type to{' '}
363
+ <code className='code'>Button.VARIANT_LINK_INLINE</code>.
320
364
  </p>
321
365
  </div>
322
366
  );
@@ -326,7 +370,7 @@ export default () => (
326
370
 
327
371
  ```html
328
372
  <div data-capture-callout="true">
329
- <div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5">Link buttons</div>
373
+ <div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5">Buttons with link styles</div>
330
374
  <div class="btn-toolbar">
331
375
  <button type="button" class="btn btn-primary btn-link btn-component" tabindex="0">
332
376
  <span class="rioglyph rioglyph-heart">
@@ -345,24 +389,67 @@ export default () => (
345
389
  </span>Danger</button>
346
390
  </div>
347
391
  <div>
348
- <div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5 margin-top-25">Link inline buttons</div>
392
+ <div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5 margin-top-25">Button with link styles - inline</div>
349
393
  </div>
350
394
  <div class="display-inline-flex gap-4">This is an example for an <button type="button" class="btn btn-primary btn-link btn-link-inline btn-component" tabindex="0">
351
395
  <span class="rioglyph rioglyph-new-window">
352
396
  </span>Inline link</button> button.</div>
353
397
  <p class="margin-top-25">
354
- <span class="label label-info label-condensed margin-right-5">Note</span> Link buttons can also be used within text blocks by setting the variant type to <code class="code">Button.VARIANT_LINK_INLINE</code>.
398
+ <span class="label label-info label-condensed margin-right-5">Note</span> Link styled buttons can also be used within text blocks by setting the variant type to <code class="code">Button.VARIANT_LINK_INLINE</code>.
355
399
  </p>
356
400
  </div>
357
401
  ```
358
402
 
359
- #### Props
403
+ #### Props: Base button props
404
+
405
+ ### Base button props
360
406
 
361
407
  | Name | Type | Default | Description |
362
408
  | --- | --- | --- | --- |
363
- | bsStyle | | | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
364
- | bsSize | | | Sets the button size. Possible values are: xs, sm, md and lg |
365
- | variant | | | Sets the button variant. Possible values are: link, link-inline, outline and action |
409
+ | disabled | boolean | false | Whether the button should be disabled. |
410
+ | active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
411
+ | iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
412
+ | iconRight | boolean | false | Adds right side spacing for an icon. This should be used when having navigation buttons that use an icon on the right side. |
413
+ | iconName | string | — | Optional rio-glyph icon name that comes in handy for icon only buttons for not adding a span tag for the icon which reduces boilerplate code. |
414
+ | multiline | boolean | false | Defines whether the button text break into multiple lines when the button space exceeds. Multiline buttons should be used as exception only. |
415
+ | block | boolean | false | Defines whether the button takes up the full width of the parent element. |
416
+ | bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
417
+ | bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
418
+ | variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
419
+ | noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
420
+ | tabIndex | number | 0 | Number of the index used for keyboard support. |
421
+ | className | string | — | Additional classes to be set on the button element. |
422
+
423
+ #### Props: Regular button
424
+
425
+ ### Regular button
426
+
427
+ | Name | Type | Default | Description |
428
+ | --- | --- | --- | --- |
429
+ | asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
430
+ | onClick | (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | — | Callback function triggered when clicking the button. |
431
+ | type | 'button' \| 'submit | 'button' | Defines the type of the button. This may be used for form submit buttons. |
432
+
433
+ #### Props: ToggleButton
434
+
435
+ ### ToggleButton
436
+
437
+ | Name | Type | Default | Description |
438
+ | --- | --- | --- | --- |
439
+ | asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
440
+ | onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
441
+
442
+ #### Props: Link element buttons
443
+
444
+ ### Link element buttons
445
+
446
+ | Name | Type | Default | Description |
447
+ | --- | --- | --- | --- |
448
+ | as | 'a' | — | Defines this component as a link element. |
449
+ | type | never | — | Native button type is not supported when using as="a". |
450
+ | href | string | — | Defines the destination URL for the link button. |
451
+ | asToggle | false | false | Toggle behavior is not supported when using as="a". |
452
+ | onClick | (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | — | Callback function triggered when clicking the link. |
366
453
 
367
454
  ### Example: Button group
368
455
 
@@ -509,13 +596,56 @@ export default () => (
509
596
  </div>
510
597
  ```
511
598
 
512
- #### Props
599
+ #### Props: Base button props
600
+
601
+ ### Base button props
513
602
 
514
603
  | Name | Type | Default | Description |
515
604
  | --- | --- | --- | --- |
516
- | bsStyle | | | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
517
- | bsSize | | | Sets the button size. Possible values are: xs, sm, md and lg |
518
- | variant | | | Sets the button variant. Possible values are: link, link-inline, outline and action |
605
+ | disabled | boolean | false | Whether the button should be disabled. |
606
+ | active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
607
+ | iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
608
+ | iconRight | boolean | false | Adds right side spacing for an icon. This should be used when having navigation buttons that use an icon on the right side. |
609
+ | iconName | string | — | Optional rio-glyph icon name that comes in handy for icon only buttons for not adding a span tag for the icon which reduces boilerplate code. |
610
+ | multiline | boolean | false | Defines whether the button text break into multiple lines when the button space exceeds. Multiline buttons should be used as exception only. |
611
+ | block | boolean | false | Defines whether the button takes up the full width of the parent element. |
612
+ | bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
613
+ | bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
614
+ | variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
615
+ | noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
616
+ | tabIndex | number | 0 | Number of the index used for keyboard support. |
617
+ | className | string | — | Additional classes to be set on the button element. |
618
+
619
+ #### Props: Regular button
620
+
621
+ ### Regular button
622
+
623
+ | Name | Type | Default | Description |
624
+ | --- | --- | --- | --- |
625
+ | asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
626
+ | onClick | (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | — | Callback function triggered when clicking the button. |
627
+ | type | 'button' \| 'submit | 'button' | Defines the type of the button. This may be used for form submit buttons. |
628
+
629
+ #### Props: ToggleButton
630
+
631
+ ### ToggleButton
632
+
633
+ | Name | Type | Default | Description |
634
+ | --- | --- | --- | --- |
635
+ | asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
636
+ | onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
637
+
638
+ #### Props: Link element buttons
639
+
640
+ ### Link element buttons
641
+
642
+ | Name | Type | Default | Description |
643
+ | --- | --- | --- | --- |
644
+ | as | 'a' | — | Defines this component as a link element. |
645
+ | type | never | — | Native button type is not supported when using as="a". |
646
+ | href | string | — | Defines the destination URL for the link button. |
647
+ | asToggle | false | false | Toggle behavior is not supported when using as="a". |
648
+ | onClick | (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | — | Callback function triggered when clicking the link. |
519
649
 
520
650
  ### Example: Outlined buttons (transparent)
521
651
 
@@ -601,13 +731,353 @@ export default () => (
601
731
  </div>
602
732
  ```
603
733
 
604
- #### Props
734
+ #### Props: Base button props
735
+
736
+ ### Base button props
737
+
738
+ | Name | Type | Default | Description |
739
+ | --- | --- | --- | --- |
740
+ | disabled | boolean | false | Whether the button should be disabled. |
741
+ | active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
742
+ | iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
743
+ | iconRight | boolean | false | Adds right side spacing for an icon. This should be used when having navigation buttons that use an icon on the right side. |
744
+ | iconName | string | — | Optional rio-glyph icon name that comes in handy for icon only buttons for not adding a span tag for the icon which reduces boilerplate code. |
745
+ | multiline | boolean | false | Defines whether the button text break into multiple lines when the button space exceeds. Multiline buttons should be used as exception only. |
746
+ | block | boolean | false | Defines whether the button takes up the full width of the parent element. |
747
+ | bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
748
+ | bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
749
+ | variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
750
+ | noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
751
+ | tabIndex | number | 0 | Number of the index used for keyboard support. |
752
+ | className | string | — | Additional classes to be set on the button element. |
753
+
754
+ #### Props: Regular button
755
+
756
+ ### Regular button
757
+
758
+ | Name | Type | Default | Description |
759
+ | --- | --- | --- | --- |
760
+ | asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
761
+ | onClick | (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | — | Callback function triggered when clicking the button. |
762
+ | type | 'button' \| 'submit | 'button' | Defines the type of the button. This may be used for form submit buttons. |
763
+
764
+ #### Props: ToggleButton
765
+
766
+ ### ToggleButton
767
+
768
+ | Name | Type | Default | Description |
769
+ | --- | --- | --- | --- |
770
+ | asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
771
+ | onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
772
+
773
+ #### Props: Link element buttons
774
+
775
+ ### Link element buttons
776
+
777
+ | Name | Type | Default | Description |
778
+ | --- | --- | --- | --- |
779
+ | as | 'a' | — | Defines this component as a link element. |
780
+ | type | never | — | Native button type is not supported when using as="a". |
781
+ | href | string | — | Defines the destination URL for the link button. |
782
+ | asToggle | false | false | Toggle behavior is not supported when using as="a". |
783
+ | onClick | (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | — | Callback function triggered when clicking the link. |
784
+
785
+ ### Example: Buttons as anchor element
786
+
787
+ Buttons as anchor element
788
+ DefaultPrimarySecondarySuccessInfoWarningDangerMuted filledMuted
789
+ Buttons as anchor element - disabled
790
+ DefaultPrimarySecondarySuccessInfoWarningDangerMuted filledMuted
791
+ Buttons as anchor element - various sizes
792
+ Extra SmallSmallMediumLarge
793
+ Buttons as anchor element - icon only
794
+
795
+ #### Summary
796
+
797
+ Buttons as anchor element
798
+ DefaultPrimarySecondarySuccessInfoWarningDangerMuted filledMuted
799
+ Buttons as anchor element - disabled
800
+ DefaultPrimarySecondarySuccessInfoWarningDangerMuted filledMuted
801
+ Buttons as anchor element - various sizes
802
+ Extra SmallSmallMediumLarge
803
+ Buttons as anchor element - icon only
804
+
805
+ #### React (tsx)
806
+
807
+ ```tsx
808
+ import Button from '@rio-cloud/rio-uikit/Button';
809
+ import ButtonToolbar from '@rio-cloud/rio-uikit/ButtonToolbar';
810
+ import FormLabel from '@rio-cloud/rio-uikit/FormLabel';
811
+
812
+ export default () => (
813
+ <div>
814
+ <FormLabel>Buttons as anchor element</FormLabel>
815
+ <ButtonToolbar>
816
+ <Button as='a' href='#' iconName='rioglyph-truck'>
817
+ Default
818
+ </Button>
819
+ <Button as='a' href='#' bsStyle={Button.PRIMARY} iconName='rioglyph-heart'>
820
+ Primary
821
+ </Button>
822
+ <Button as='a' href='#' bsStyle={Button.SECONDARY} iconName='rioglyph-poi'>
823
+ Secondary
824
+ </Button>
825
+ <Button as='a' href='#' bsStyle={Button.SUCCESS} iconName='rioglyph-thumbs-up'>
826
+ Success
827
+ </Button>
828
+ <Button as='a' href='#' bsStyle={Button.INFO} iconName='rioglyph-info-sign'>
829
+ Info
830
+ </Button>
831
+ <Button as='a' href='#' bsStyle={Button.WARNING} iconName='rioglyph-warning-sign'>
832
+ Warning
833
+ </Button>
834
+ <Button as='a' href='#' bsStyle={Button.DANGER} iconName='rioglyph-error-sign'>
835
+ Danger
836
+ </Button>
837
+ <Button as='a' href='#' bsStyle={Button.MUTED_FILLED} iconName='rioglyph-cog'>
838
+ Muted filled
839
+ </Button>
840
+ <Button as='a' href='#' bsStyle={Button.MUTED} iconName='rioglyph-heart'>
841
+ Muted
842
+ </Button>
843
+ </ButtonToolbar>
844
+
845
+ <FormLabel className='margin-top-15'>Buttons as anchor element - disabled</FormLabel>
846
+ <ButtonToolbar>
847
+ <Button as='a' href='#' disabled iconName='rioglyph-truck'>
848
+ Default
849
+ </Button>
850
+ <Button as='a' href='#' bsStyle={Button.PRIMARY} disabled iconName='rioglyph-heart'>
851
+ Primary
852
+ </Button>
853
+ <Button as='a' href='#' bsStyle={Button.SECONDARY} disabled iconName='rioglyph-poi'>
854
+ Secondary
855
+ </Button>
856
+ <Button as='a' href='#' bsStyle={Button.SUCCESS} disabled iconName='rioglyph-thumbs-up'>
857
+ Success
858
+ </Button>
859
+ <Button as='a' href='#' bsStyle={Button.INFO} disabled iconName='rioglyph-info-sign'>
860
+ Info
861
+ </Button>
862
+ <Button as='a' href='#' bsStyle={Button.WARNING} disabled iconName='rioglyph-warning-sign'>
863
+ Warning
864
+ </Button>
865
+ <Button as='a' href='#' bsStyle={Button.DANGER} disabled iconName='rioglyph-error-sign'>
866
+ Danger
867
+ </Button>
868
+ <Button as='a' href='#' bsStyle={Button.MUTED_FILLED} disabled iconName='rioglyph-cog'>
869
+ Muted filled
870
+ </Button>
871
+ <Button as='a' href='#' bsStyle={Button.MUTED} disabled iconName='rioglyph-heart'>
872
+ Muted
873
+ </Button>
874
+ </ButtonToolbar>
875
+
876
+ <FormLabel className='margin-top-15'>Buttons as anchor element - various sizes</FormLabel>
877
+ <ButtonToolbar>
878
+ <Button as='a' href='#' bsSize={Button.XS} iconName='rioglyph-truck'>
879
+ Extra Small
880
+ </Button>
881
+ <Button as='a' href='#' bsStyle={Button.PRIMARY} bsSize={Button.SM} iconName='rioglyph-heart'>
882
+ Small
883
+ </Button>
884
+ <Button as='a' href='#' bsStyle={Button.SUCCESS} bsSize={Button.MD} iconName='rioglyph-thumbs-up'>
885
+ Medium
886
+ </Button>
887
+ <Button
888
+ as='a'
889
+ href='#'
890
+ bsStyle={Button.INFO}
891
+ bsSize={Button.LG}
892
+ onClick={() => console.log('button clicked')}
893
+ iconName='rioglyph-info-sign'
894
+ >
895
+ Large
896
+ </Button>
897
+ </ButtonToolbar>
898
+
899
+ <FormLabel className='margin-top-15'>Buttons as anchor element - icon only</FormLabel>
900
+ <ButtonToolbar>
901
+ <Button as='a' href='#' iconOnly iconName='rioglyph-truck' />
902
+ <Button as='a' href='#' bsStyle={Button.PRIMARY} iconOnly iconName='rioglyph-heart' />
903
+ <Button as='a' href='#' bsStyle={Button.SUCCESS} iconOnly iconName='rioglyph-thumbs-up' />
904
+ <Button as='a' href='#' bsStyle={Button.INFO} iconOnly iconName='rioglyph-status-driving' />
905
+ <Button as='a' href='#' bsStyle={Button.WARNING} iconOnly iconName='rioglyph-warning-sign' />
906
+ <Button as='a' href='#' bsStyle={Button.DANGER} iconOnly iconName='rioglyph-error-sign' />
907
+ <Button as='a' href='#' bsStyle={Button.MUTED_FILLED} iconOnly iconName='rioglyph-cog' />
908
+ <Button as='a' href='#' bsStyle={Button.MUTED} iconOnly iconName='rioglyph-heart' />
909
+ </ButtonToolbar>
910
+ </div>
911
+ );
912
+ ```
913
+
914
+ #### HTML (html)
915
+
916
+ ```html
917
+ <div>
918
+ <div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5">Buttons as anchor element</div>
919
+ <div class="btn-toolbar">
920
+ <a href="#" class="btn btn-default gap-0 btn-component" tabindex="0">
921
+ <span class="rioglyph rioglyph-truck">
922
+ </span>Default</a>
923
+ <a href="#" class="btn btn-primary gap-0 btn-component" tabindex="0">
924
+ <span class="rioglyph rioglyph-heart">
925
+ </span>Primary</a>
926
+ <a href="#" class="btn btn-secondary gap-0 btn-component" tabindex="0">
927
+ <span class="rioglyph rioglyph-poi">
928
+ </span>Secondary</a>
929
+ <a href="#" class="btn btn-success gap-0 btn-component" tabindex="0">
930
+ <span class="rioglyph rioglyph-thumbs-up">
931
+ </span>Success</a>
932
+ <a href="#" class="btn btn-info gap-0 btn-component" tabindex="0">
933
+ <span class="rioglyph rioglyph-info-sign">
934
+ </span>Info</a>
935
+ <a href="#" class="btn btn-warning gap-0 btn-component" tabindex="0">
936
+ <span class="rioglyph rioglyph-warning-sign">
937
+ </span>Warning</a>
938
+ <a href="#" class="btn btn-danger gap-0 btn-component" tabindex="0">
939
+ <span class="rioglyph rioglyph-error-sign">
940
+ </span>Danger</a>
941
+ <a href="#" class="btn btn-muted-filled gap-0 btn-component" tabindex="0">
942
+ <span class="rioglyph rioglyph-cog">
943
+ </span>Muted filled</a>
944
+ <a href="#" class="btn btn-muted gap-0 btn-component" tabindex="0">
945
+ <span class="rioglyph rioglyph-heart">
946
+ </span>Muted</a>
947
+ </div>
948
+ <div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5 margin-top-15">Buttons as anchor element - disabled</div>
949
+ <div class="btn-toolbar">
950
+ <a href="#" class="btn btn-default gap-0 disabled btn-component" aria-disabled="true" tabindex="-1">
951
+ <span class="rioglyph rioglyph-truck">
952
+ </span>Default</a>
953
+ <a href="#" class="btn btn-primary gap-0 disabled btn-component" aria-disabled="true" tabindex="-1">
954
+ <span class="rioglyph rioglyph-heart">
955
+ </span>Primary</a>
956
+ <a href="#" class="btn btn-secondary gap-0 disabled btn-component" aria-disabled="true" tabindex="-1">
957
+ <span class="rioglyph rioglyph-poi">
958
+ </span>Secondary</a>
959
+ <a href="#" class="btn btn-success gap-0 disabled btn-component" aria-disabled="true" tabindex="-1">
960
+ <span class="rioglyph rioglyph-thumbs-up">
961
+ </span>Success</a>
962
+ <a href="#" class="btn btn-info gap-0 disabled btn-component" aria-disabled="true" tabindex="-1">
963
+ <span class="rioglyph rioglyph-info-sign">
964
+ </span>Info</a>
965
+ <a href="#" class="btn btn-warning gap-0 disabled btn-component" aria-disabled="true" tabindex="-1">
966
+ <span class="rioglyph rioglyph-warning-sign">
967
+ </span>Warning</a>
968
+ <a href="#" class="btn btn-danger gap-0 disabled btn-component" aria-disabled="true" tabindex="-1">
969
+ <span class="rioglyph rioglyph-error-sign">
970
+ </span>Danger</a>
971
+ <a href="#" class="btn btn-muted-filled gap-0 disabled btn-component" aria-disabled="true" tabindex="-1">
972
+ <span class="rioglyph rioglyph-cog">
973
+ </span>Muted filled</a>
974
+ <a href="#" class="btn btn-muted gap-0 disabled btn-component" aria-disabled="true" tabindex="-1">
975
+ <span class="rioglyph rioglyph-heart">
976
+ </span>Muted</a>
977
+ </div>
978
+ <div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5 margin-top-15">Buttons as anchor element - various sizes</div>
979
+ <div class="btn-toolbar">
980
+ <a href="#" class="btn btn-default btn-xs gap-0 btn-component" tabindex="0">
981
+ <span class="rioglyph rioglyph-truck">
982
+ </span>Extra Small</a>
983
+ <a href="#" class="btn btn-primary btn-sm gap-0 btn-component" tabindex="0">
984
+ <span class="rioglyph rioglyph-heart">
985
+ </span>Small</a>
986
+ <a href="#" class="btn btn-success btn-md gap-0 btn-component" tabindex="0">
987
+ <span class="rioglyph rioglyph-thumbs-up">
988
+ </span>Medium</a>
989
+ <a href="#" class="btn btn-info btn-lg gap-0 btn-component" tabindex="0">
990
+ <span class="rioglyph rioglyph-info-sign">
991
+ </span>Large</a>
992
+ </div>
993
+ <div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5 margin-top-15">Buttons as anchor element - icon only</div>
994
+ <div class="btn-toolbar">
995
+ <a href="#" class="btn btn-default btn-icon-only gap-0 btn-component" tabindex="0">
996
+ <span class="rioglyph rioglyph-truck">
997
+ </span>
998
+ </a>
999
+ <a href="#" class="btn btn-primary btn-icon-only gap-0 btn-component" tabindex="0">
1000
+ <span class="rioglyph rioglyph-heart">
1001
+ </span>
1002
+ </a>
1003
+ <a href="#" class="btn btn-success btn-icon-only gap-0 btn-component" tabindex="0">
1004
+ <span class="rioglyph rioglyph-thumbs-up">
1005
+ </span>
1006
+ </a>
1007
+ <a href="#" class="btn btn-info btn-icon-only gap-0 btn-component" tabindex="0">
1008
+ <span class="rioglyph rioglyph-status-driving">
1009
+ </span>
1010
+ </a>
1011
+ <a href="#" class="btn btn-warning btn-icon-only gap-0 btn-component" tabindex="0">
1012
+ <span class="rioglyph rioglyph-warning-sign">
1013
+ </span>
1014
+ </a>
1015
+ <a href="#" class="btn btn-danger btn-icon-only gap-0 btn-component" tabindex="0">
1016
+ <span class="rioglyph rioglyph-error-sign">
1017
+ </span>
1018
+ </a>
1019
+ <a href="#" class="btn btn-muted-filled btn-icon-only gap-0 btn-component" tabindex="0">
1020
+ <span class="rioglyph rioglyph-cog">
1021
+ </span>
1022
+ </a>
1023
+ <a href="#" class="btn btn-muted btn-icon-only gap-0 btn-component" tabindex="0">
1024
+ <span class="rioglyph rioglyph-heart">
1025
+ </span>
1026
+ </a>
1027
+ </div>
1028
+ </div>
1029
+ ```
1030
+
1031
+ #### Props: Base button props
1032
+
1033
+ ### Base button props
1034
+
1035
+ | Name | Type | Default | Description |
1036
+ | --- | --- | --- | --- |
1037
+ | disabled | boolean | false | Whether the button should be disabled. |
1038
+ | active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
1039
+ | iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
1040
+ | iconRight | boolean | false | Adds right side spacing for an icon. This should be used when having navigation buttons that use an icon on the right side. |
1041
+ | iconName | string | — | Optional rio-glyph icon name that comes in handy for icon only buttons for not adding a span tag for the icon which reduces boilerplate code. |
1042
+ | multiline | boolean | false | Defines whether the button text break into multiple lines when the button space exceeds. Multiline buttons should be used as exception only. |
1043
+ | block | boolean | false | Defines whether the button takes up the full width of the parent element. |
1044
+ | bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
1045
+ | bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
1046
+ | variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
1047
+ | noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
1048
+ | tabIndex | number | 0 | Number of the index used for keyboard support. |
1049
+ | className | string | — | Additional classes to be set on the button element. |
1050
+
1051
+ #### Props: Regular button
1052
+
1053
+ ### Regular button
1054
+
1055
+ | Name | Type | Default | Description |
1056
+ | --- | --- | --- | --- |
1057
+ | asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
1058
+ | onClick | (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | — | Callback function triggered when clicking the button. |
1059
+ | type | 'button' \| 'submit | 'button' | Defines the type of the button. This may be used for form submit buttons. |
1060
+
1061
+ #### Props: ToggleButton
1062
+
1063
+ ### ToggleButton
1064
+
1065
+ | Name | Type | Default | Description |
1066
+ | --- | --- | --- | --- |
1067
+ | asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
1068
+ | onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
1069
+
1070
+ #### Props: Link element buttons
1071
+
1072
+ ### Link element buttons
605
1073
 
606
1074
  | Name | Type | Default | Description |
607
1075
  | --- | --- | --- | --- |
608
- | bsStyle | | — | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
609
- | bsSize | | — | Sets the button size. Possible values are: xs, sm, md and lg |
610
- | variant | | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
1076
+ | as | 'a' | — | Defines this component as a link element. |
1077
+ | type | never | — | Native button type is not supported when using as="a". |
1078
+ | href | string | — | Defines the destination URL for the link button. |
1079
+ | asToggle | false | false | Toggle behavior is not supported when using as="a". |
1080
+ | onClick | (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | — | Callback function triggered when clicking the link. |
611
1081
 
612
1082
  ### Example: Action buttons
613
1083
 
@@ -711,10 +1181,53 @@ export default () => (
711
1181
  </div>
712
1182
  ```
713
1183
 
714
- #### Props
1184
+ #### Props: Base button props
1185
+
1186
+ ### Base button props
1187
+
1188
+ | Name | Type | Default | Description |
1189
+ | --- | --- | --- | --- |
1190
+ | disabled | boolean | false | Whether the button should be disabled. |
1191
+ | active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
1192
+ | iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
1193
+ | iconRight | boolean | false | Adds right side spacing for an icon. This should be used when having navigation buttons that use an icon on the right side. |
1194
+ | iconName | string | — | Optional rio-glyph icon name that comes in handy for icon only buttons for not adding a span tag for the icon which reduces boilerplate code. |
1195
+ | multiline | boolean | false | Defines whether the button text break into multiple lines when the button space exceeds. Multiline buttons should be used as exception only. |
1196
+ | block | boolean | false | Defines whether the button takes up the full width of the parent element. |
1197
+ | bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
1198
+ | bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
1199
+ | variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
1200
+ | noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
1201
+ | tabIndex | number | 0 | Number of the index used for keyboard support. |
1202
+ | className | string | — | Additional classes to be set on the button element. |
1203
+
1204
+ #### Props: Regular button
1205
+
1206
+ ### Regular button
1207
+
1208
+ | Name | Type | Default | Description |
1209
+ | --- | --- | --- | --- |
1210
+ | asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
1211
+ | onClick | (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | — | Callback function triggered when clicking the button. |
1212
+ | type | 'button' \| 'submit | 'button' | Defines the type of the button. This may be used for form submit buttons. |
1213
+
1214
+ #### Props: ToggleButton
1215
+
1216
+ ### ToggleButton
1217
+
1218
+ | Name | Type | Default | Description |
1219
+ | --- | --- | --- | --- |
1220
+ | asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
1221
+ | onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
1222
+
1223
+ #### Props: Link element buttons
1224
+
1225
+ ### Link element buttons
715
1226
 
716
1227
  | Name | Type | Default | Description |
717
1228
  | --- | --- | --- | --- |
718
- | bsStyle | | — | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
719
- | bsSize | | — | Sets the button size. Possible values are: xs, sm, md and lg |
720
- | variant | | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
1229
+ | as | 'a' | — | Defines this component as a link element. |
1230
+ | type | never | — | Native button type is not supported when using as="a". |
1231
+ | href | string | — | Defines the destination URL for the link button. |
1232
+ | asToggle | false | false | Toggle behavior is not supported when using as="a". |
1233
+ | onClick | (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | — | Callback function triggered when clicking the link. |