@rio-cloud/uikit-mcp 1.1.5 → 1.1.7
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/doc-metadata.json +129 -29
- package/dist/docs/components/accentBar.md +2 -2
- package/dist/docs/components/activity.md +2 -2
- package/dist/docs/components/animatedNumber.md +3 -3
- package/dist/docs/components/animatedTextReveal.md +7 -7
- package/dist/docs/components/animations.md +33 -33
- package/dist/docs/components/appHeader.md +8 -8
- package/dist/docs/components/appLayout.md +106 -89
- package/dist/docs/components/appNavigationBar.md +2 -2
- package/dist/docs/components/areaCharts.md +14 -14
- package/dist/docs/components/aspectRatioPlaceholder.md +2 -2
- package/dist/docs/components/assetTree.md +209 -404
- package/dist/docs/components/autosuggests.md +2 -2
- package/dist/docs/components/avatar.md +2 -2
- package/dist/docs/components/banner.md +3 -3
- package/dist/docs/components/barCharts.md +24 -24
- package/dist/docs/components/barList.md +11 -11
- package/dist/docs/components/basicMap.md +2 -2
- package/dist/docs/components/bottomSheet.md +2 -2
- package/dist/docs/components/button.md +400 -32
- package/dist/docs/components/buttonToolbar.md +2 -2
- package/dist/docs/components/calendarStripe.md +96 -36
- package/dist/docs/components/card.md +2 -2
- package/dist/docs/components/carousel.md +2 -2
- package/dist/docs/components/chartColors.md +2 -2
- package/dist/docs/components/chartsGettingStarted.md +2 -2
- package/dist/docs/components/chat.md +3 -3
- package/dist/docs/components/checkbox.md +17 -20
- package/dist/docs/components/circularProgress.md +465 -0
- package/dist/docs/components/clearableInput.md +2 -2
- package/dist/docs/components/collapse.md +3 -3
- package/dist/docs/components/composedCharts.md +20 -20
- package/dist/docs/components/contentLoader.md +102 -102
- package/dist/docs/components/dataTabs.md +10 -10
- package/dist/docs/components/datepickers.md +31 -31
- package/dist/docs/components/dialogs.md +2 -2
- package/dist/docs/components/divider.md +2 -2
- package/dist/docs/components/dropdowns.md +4354 -4387
- package/dist/docs/components/editableContent.md +2 -2
- package/dist/docs/components/expander.md +2 -2
- package/dist/docs/components/fade.md +2 -2
- package/dist/docs/components/fadeExpander.md +3 -3
- package/dist/docs/components/fadeUp.md +3 -3
- package/dist/docs/components/feedback.md +2 -2
- package/dist/docs/components/filePickers.md +2 -2
- package/dist/docs/components/formLabel.md +5 -4
- package/dist/docs/components/groupedItemList.md +2 -2
- package/dist/docs/components/iconList.md +4 -4
- package/dist/docs/components/imagePreloader.md +2 -2
- package/dist/docs/components/labeledElement.md +2 -2
- package/dist/docs/components/licensePlate.md +2 -2
- package/dist/docs/components/lineCharts.md +11 -11
- package/dist/docs/components/listMenu.md +7 -7
- package/dist/docs/components/loadMore.md +2 -2
- package/dist/docs/components/mainNavigation.md +5 -5
- package/dist/docs/components/mapCircle.md +2 -2
- package/dist/docs/components/mapCluster.md +2 -2
- package/dist/docs/components/mapContext.md +2 -2
- package/dist/docs/components/mapDraggableMarker.md +2 -2
- package/dist/docs/components/mapGettingStarted.md +2 -2
- package/dist/docs/components/mapInfoBubble.md +2 -2
- package/dist/docs/components/mapLayerGroup.md +2 -2
- package/dist/docs/components/mapMarker.md +2 -2
- package/dist/docs/components/mapPolygon.md +2 -2
- package/dist/docs/components/mapRoute.md +2 -2
- package/dist/docs/components/mapRouteGenerator.md +2 -2
- package/dist/docs/components/mapSettings.md +9 -9
- package/dist/docs/components/mapUtils.md +2 -2
- package/dist/docs/components/multiselects.md +2 -2
- package/dist/docs/components/noData.md +2 -2
- package/dist/docs/components/notifications.md +2 -2
- package/dist/docs/components/numbercontrol.md +5 -4
- package/dist/docs/components/onboarding.md +2 -2
- package/dist/docs/components/page.md +2 -2
- package/dist/docs/components/pager.md +2 -2
- package/dist/docs/components/pieCharts.md +89 -78
- package/dist/docs/components/popover.md +2 -2
- package/dist/docs/components/position.md +2 -2
- package/dist/docs/components/radialBarCharts.md +2054 -2012
- package/dist/docs/components/radioCardGroup.md +487 -0
- package/dist/docs/components/radiobutton.md +2 -2
- package/dist/docs/components/releaseNotes.md +2 -2
- package/dist/docs/components/resizer.md +2 -2
- package/dist/docs/components/responsiveColumnStripe.md +2 -2
- package/dist/docs/components/responsiveVideo.md +2 -2
- package/dist/docs/components/rioglyph.md +2 -2
- package/dist/docs/components/rules.md +2 -2
- package/dist/docs/components/saveableInput.md +20 -20
- package/dist/docs/components/selects.md +2 -2
- package/dist/docs/components/sidebar.md +2 -2
- package/dist/docs/components/sliders.md +2 -2
- package/dist/docs/components/smoothScrollbars.md +2 -2
- package/dist/docs/components/spinners.md +2 -2
- package/dist/docs/components/states.md +2 -2
- package/dist/docs/components/statsWidgets.md +2 -2
- package/dist/docs/components/statusBar.md +2 -2
- package/dist/docs/components/stepButton.md +2 -2
- package/dist/docs/components/steppedProgressBars.md +2 -2
- package/dist/docs/components/subNavigation.md +17 -17
- package/dist/docs/components/supportMarker.md +2 -2
- package/dist/docs/components/svgImage.md +38 -2
- package/dist/docs/components/switch.md +210 -83
- package/dist/docs/components/tables.md +2 -2
- package/dist/docs/components/tagManager.md +2 -2
- package/dist/docs/components/tags.md +2 -2
- package/dist/docs/components/teaser.md +2 -2
- package/dist/docs/components/textTruncateMiddle.md +151 -0
- package/dist/docs/components/timeline.md +2 -2
- package/dist/docs/components/timepicker.md +660 -64
- package/dist/docs/components/toggleButton.md +37 -9
- package/dist/docs/components/tooltip.md +5 -4
- package/dist/docs/components/tracker.md +631 -0
- package/dist/docs/components/virtualList.md +77 -77
- package/dist/docs/foundations.md +594 -222
- package/dist/docs/start/changelog.md +54 -2
- package/dist/docs/start/goodtoknow.md +2 -2
- package/dist/docs/start/guidelines/color-combinations.md +2 -2
- package/dist/docs/start/guidelines/custom-css.md +2 -2
- package/dist/docs/start/guidelines/custom-rioglyph.md +2 -2
- package/dist/docs/start/guidelines/formatting.md +2 -2
- package/dist/docs/start/guidelines/iframe.md +3 -3
- package/dist/docs/start/guidelines/obfuscate-data.md +2 -2
- package/dist/docs/start/guidelines/print-css.md +2 -2
- package/dist/docs/start/guidelines/spinner.md +82 -82
- package/dist/docs/start/guidelines/state-in-url.md +263 -0
- package/dist/docs/start/guidelines/supported-browsers.md +2 -2
- package/dist/docs/start/guidelines/writing.md +2 -2
- package/dist/docs/start/howto.md +10 -10
- package/dist/docs/start/intro.md +2 -2
- package/dist/docs/start/responsiveness.md +2 -2
- package/dist/docs/templates/common-table.md +15 -14
- package/dist/docs/templates/detail-views.md +3 -3
- package/dist/docs/templates/expandable-details.md +2 -2
- package/dist/docs/templates/feature-cards.md +56 -56
- package/dist/docs/templates/form-summary.md +23 -23
- package/dist/docs/templates/form-toggle.md +2 -2
- package/dist/docs/templates/list-blocks.md +204 -204
- package/dist/docs/templates/loading-progress.md +2 -2
- package/dist/docs/templates/options-panel.md +2 -2
- package/dist/docs/templates/panel-variants.md +2 -2
- package/dist/docs/templates/progress-cards.md +2 -2
- package/dist/docs/templates/progress-success.md +2 -2
- package/dist/docs/templates/settings-form.md +24 -24
- package/dist/docs/templates/stats-blocks.md +15 -15
- package/dist/docs/templates/table-panel.md +2 -2
- package/dist/docs/templates/table-row-animation.md +2 -2
- package/dist/docs/templates/usage-cards.md +2 -2
- package/dist/docs/utilities/classNames.md +191 -0
- package/dist/docs/utilities/deviceUtils.md +2 -2
- package/dist/docs/utilities/featureToggles.md +2 -2
- package/dist/docs/utilities/fuelTypeUtils.md +2 -2
- package/dist/docs/utilities/routeUtils.md +326 -90
- package/dist/docs/utilities/useAfterMount.md +2 -2
- package/dist/docs/utilities/useAutoAnimate.md +2 -2
- package/dist/docs/utilities/useAverage.md +2 -2
- package/dist/docs/utilities/useClickOutside.md +2 -2
- package/dist/docs/utilities/useClipboard.md +3 -3
- package/dist/docs/utilities/useCookies.md +188 -0
- package/dist/docs/utilities/useCount.md +2 -2
- package/dist/docs/utilities/useDarkMode.md +2 -2
- package/dist/docs/utilities/useDebugInfo.md +5 -5
- package/dist/docs/utilities/useEffectOnce.md +2 -2
- package/dist/docs/utilities/useElapsedTime.md +2 -2
- package/dist/docs/utilities/useElementSize.md +2 -2
- package/dist/docs/utilities/useEsc.md +2 -2
- package/dist/docs/utilities/useEvent.md +2 -2
- package/dist/docs/utilities/useFocusTrap.md +2 -2
- package/dist/docs/utilities/useFullscreen.md +2 -2
- package/dist/docs/utilities/useHover.md +2 -2
- package/dist/docs/utilities/useIncomingPostMessages.md +2 -2
- package/dist/docs/utilities/useInterval.md +2 -2
- package/dist/docs/utilities/useIsFocusWithin.md +2 -2
- package/dist/docs/utilities/useKey.md +2 -2
- package/dist/docs/utilities/useLocalStorage.md +2 -2
- package/dist/docs/utilities/useLocationSuggestions.md +2 -2
- package/dist/docs/utilities/useMax.md +2 -2
- package/dist/docs/utilities/useMin.md +2 -2
- package/dist/docs/utilities/useMutationObserver.md +2 -2
- package/dist/docs/utilities/useOnScreen.md +2 -2
- package/dist/docs/utilities/useOnlineStatus.md +2 -2
- package/dist/docs/utilities/usePostMessage.md +3 -3
- package/dist/docs/utilities/usePostMessageSender.md +2 -2
- package/dist/docs/utilities/usePrevious.md +2 -2
- package/dist/docs/utilities/useResizeObserver.md +2 -2
- package/dist/docs/utilities/useRioCookieConsent.md +90 -0
- package/dist/docs/utilities/useScrollPosition.md +2 -2
- package/dist/docs/utilities/useSearch.md +2 -2
- package/dist/docs/utilities/useSearchHighlight.md +815 -0
- package/dist/docs/utilities/useSorting.md +2 -2
- package/dist/docs/utilities/useStateWithValidation.md +2 -2
- package/dist/docs/utilities/useSum.md +2 -2
- package/dist/docs/utilities/useTableExport.md +52 -52
- package/dist/docs/utilities/useTableSelection.md +90 -90
- package/dist/docs/utilities/useTimeout.md +2 -2
- package/dist/docs/utilities/useToggle.md +3 -3
- package/dist/docs/utilities/useUrlState.md +418 -0
- package/dist/docs/utilities/useWindowResize.md +2 -2
- package/dist/index.mjs +1 -1
- package/dist/version.json +2 -2
- 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
|
|
6
|
-
*Captured:* 2026-02-
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#/components/button
|
|
6
|
+
*Captured:* 2026-02-23T15:48:12.234Z
|
|
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,19 +251,20 @@ export default () => (
|
|
|
251
251
|
</div>
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
-
#### Props
|
|
254
|
+
#### Props: Base button props
|
|
255
|
+
|
|
256
|
+
### Base button props
|
|
255
257
|
|
|
256
258
|
| Name | Type | Default | Description |
|
|
257
259
|
| --- | --- | --- | --- |
|
|
258
260
|
| disabled | boolean | false | Whether the button should be disabled. |
|
|
259
261
|
| active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
|
|
260
|
-
| type | 'button' \| 'submit' | 'button' | Defines the type of the button. This may be used for form submit buttons. |
|
|
261
262
|
| iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
|
|
262
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. |
|
|
263
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. |
|
|
264
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. |
|
|
265
266
|
| block | boolean | false | Defines whether the button takes up the full width of the parent element. |
|
|
266
|
-
| bsStyle | BUTTON_STYLE |
|
|
267
|
+
| bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
|
|
267
268
|
| bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
|
|
268
269
|
| variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
|
|
269
270
|
| noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
|
|
@@ -278,6 +279,7 @@ export default () => (
|
|
|
278
279
|
| --- | --- | --- | --- |
|
|
279
280
|
| asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
280
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. |
|
|
281
283
|
|
|
282
284
|
#### Props: ToggleButton
|
|
283
285
|
|
|
@@ -288,23 +290,35 @@ export default () => (
|
|
|
288
290
|
| asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
289
291
|
| onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
|
|
290
292
|
|
|
291
|
-
|
|
293
|
+
#### Props: Link element buttons
|
|
294
|
+
|
|
295
|
+
### Link element buttons
|
|
292
296
|
|
|
293
|
-
|
|
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
|
|
294
308
|
PrimarySuccessInfoWarningDanger
|
|
295
|
-
|
|
309
|
+
Button with link styles - inline
|
|
296
310
|
|
|
297
311
|
This is an example for an Inline link button.
|
|
298
|
-
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.
|
|
299
313
|
|
|
300
314
|
#### Summary
|
|
301
315
|
|
|
302
|
-
|
|
316
|
+
Buttons with link styles
|
|
303
317
|
PrimarySuccessInfoWarningDanger
|
|
304
|
-
|
|
318
|
+
Button with link styles - inline
|
|
305
319
|
|
|
306
320
|
This is an example for an Inline link button.
|
|
307
|
-
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.
|
|
308
322
|
|
|
309
323
|
#### React (tsx)
|
|
310
324
|
|
|
@@ -315,7 +329,7 @@ import FormLabel from '@rio-cloud/rio-uikit/FormLabel';
|
|
|
315
329
|
|
|
316
330
|
export default () => (
|
|
317
331
|
<div>
|
|
318
|
-
<FormLabel>
|
|
332
|
+
<FormLabel>Buttons with link styles</FormLabel>
|
|
319
333
|
<ButtonToolbar>
|
|
320
334
|
<Button bsStyle={Button.PRIMARY} variant={Button.VARIANT_LINK} iconName='rioglyph-heart'>
|
|
321
335
|
Primary
|
|
@@ -334,7 +348,7 @@ export default () => (
|
|
|
334
348
|
</Button>
|
|
335
349
|
</ButtonToolbar>
|
|
336
350
|
<div>
|
|
337
|
-
<FormLabel className='margin-top-25'>
|
|
351
|
+
<FormLabel className='margin-top-25'>Button with link styles - inline</FormLabel>
|
|
338
352
|
</div>
|
|
339
353
|
<div className='display-inline-flex gap-4'>
|
|
340
354
|
This is an example for an{' '}
|
|
@@ -344,8 +358,9 @@ export default () => (
|
|
|
344
358
|
button.
|
|
345
359
|
</div>
|
|
346
360
|
<p className='margin-top-25'>
|
|
347
|
-
<span className='label label-info label-condensed margin-right-5'>Note</span> Link buttons can also
|
|
348
|
-
within text blocks by setting the variant type to
|
|
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>.
|
|
349
364
|
</p>
|
|
350
365
|
</div>
|
|
351
366
|
);
|
|
@@ -355,7 +370,7 @@ export default () => (
|
|
|
355
370
|
|
|
356
371
|
```html
|
|
357
372
|
<div data-capture-callout="true">
|
|
358
|
-
<div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5">
|
|
373
|
+
<div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5">Buttons with link styles</div>
|
|
359
374
|
<div class="btn-toolbar">
|
|
360
375
|
<button type="button" class="btn btn-primary btn-link btn-component" tabindex="0">
|
|
361
376
|
<span class="rioglyph rioglyph-heart">
|
|
@@ -374,30 +389,31 @@ export default () => (
|
|
|
374
389
|
</span>Danger</button>
|
|
375
390
|
</div>
|
|
376
391
|
<div>
|
|
377
|
-
<div class="text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5 margin-top-25">
|
|
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>
|
|
378
393
|
</div>
|
|
379
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">
|
|
380
395
|
<span class="rioglyph rioglyph-new-window">
|
|
381
396
|
</span>Inline link</button> button.</div>
|
|
382
397
|
<p class="margin-top-25">
|
|
383
|
-
<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>.
|
|
384
399
|
</p>
|
|
385
400
|
</div>
|
|
386
401
|
```
|
|
387
402
|
|
|
388
|
-
#### Props
|
|
403
|
+
#### Props: Base button props
|
|
404
|
+
|
|
405
|
+
### Base button props
|
|
389
406
|
|
|
390
407
|
| Name | Type | Default | Description |
|
|
391
408
|
| --- | --- | --- | --- |
|
|
392
409
|
| disabled | boolean | false | Whether the button should be disabled. |
|
|
393
410
|
| active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
|
|
394
|
-
| type | 'button' \| 'submit' | 'button' | Defines the type of the button. This may be used for form submit buttons. |
|
|
395
411
|
| iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
|
|
396
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. |
|
|
397
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. |
|
|
398
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. |
|
|
399
415
|
| block | boolean | false | Defines whether the button takes up the full width of the parent element. |
|
|
400
|
-
| bsStyle | BUTTON_STYLE |
|
|
416
|
+
| bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
|
|
401
417
|
| bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
|
|
402
418
|
| variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
|
|
403
419
|
| noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
|
|
@@ -412,6 +428,7 @@ export default () => (
|
|
|
412
428
|
| --- | --- | --- | --- |
|
|
413
429
|
| asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
414
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. |
|
|
415
432
|
|
|
416
433
|
#### Props: ToggleButton
|
|
417
434
|
|
|
@@ -422,6 +439,18 @@ export default () => (
|
|
|
422
439
|
| asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
423
440
|
| onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
|
|
424
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. |
|
|
453
|
+
|
|
425
454
|
### Example: Button group
|
|
426
455
|
|
|
427
456
|
Button group
|
|
@@ -567,19 +596,20 @@ export default () => (
|
|
|
567
596
|
</div>
|
|
568
597
|
```
|
|
569
598
|
|
|
570
|
-
#### Props
|
|
599
|
+
#### Props: Base button props
|
|
600
|
+
|
|
601
|
+
### Base button props
|
|
571
602
|
|
|
572
603
|
| Name | Type | Default | Description |
|
|
573
604
|
| --- | --- | --- | --- |
|
|
574
605
|
| disabled | boolean | false | Whether the button should be disabled. |
|
|
575
606
|
| active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
|
|
576
|
-
| type | 'button' \| 'submit' | 'button' | Defines the type of the button. This may be used for form submit buttons. |
|
|
577
607
|
| iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
|
|
578
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. |
|
|
579
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. |
|
|
580
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. |
|
|
581
611
|
| block | boolean | false | Defines whether the button takes up the full width of the parent element. |
|
|
582
|
-
| bsStyle | BUTTON_STYLE |
|
|
612
|
+
| bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
|
|
583
613
|
| bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
|
|
584
614
|
| variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
|
|
585
615
|
| noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
|
|
@@ -594,6 +624,7 @@ export default () => (
|
|
|
594
624
|
| --- | --- | --- | --- |
|
|
595
625
|
| asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
596
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. |
|
|
597
628
|
|
|
598
629
|
#### Props: ToggleButton
|
|
599
630
|
|
|
@@ -604,6 +635,18 @@ export default () => (
|
|
|
604
635
|
| asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
605
636
|
| onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
|
|
606
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. |
|
|
649
|
+
|
|
607
650
|
### Example: Outlined buttons (transparent)
|
|
608
651
|
|
|
609
652
|
Outlined buttons (transparent)
|
|
@@ -688,19 +731,20 @@ export default () => (
|
|
|
688
731
|
</div>
|
|
689
732
|
```
|
|
690
733
|
|
|
691
|
-
#### Props
|
|
734
|
+
#### Props: Base button props
|
|
735
|
+
|
|
736
|
+
### Base button props
|
|
692
737
|
|
|
693
738
|
| Name | Type | Default | Description |
|
|
694
739
|
| --- | --- | --- | --- |
|
|
695
740
|
| disabled | boolean | false | Whether the button should be disabled. |
|
|
696
741
|
| active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
|
|
697
|
-
| type | 'button' \| 'submit' | 'button' | Defines the type of the button. This may be used for form submit buttons. |
|
|
698
742
|
| iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
|
|
699
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. |
|
|
700
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. |
|
|
701
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. |
|
|
702
746
|
| block | boolean | false | Defines whether the button takes up the full width of the parent element. |
|
|
703
|
-
| bsStyle | BUTTON_STYLE |
|
|
747
|
+
| bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
|
|
704
748
|
| bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
|
|
705
749
|
| variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
|
|
706
750
|
| noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
|
|
@@ -715,6 +759,7 @@ export default () => (
|
|
|
715
759
|
| --- | --- | --- | --- |
|
|
716
760
|
| asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
717
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. |
|
|
718
763
|
|
|
719
764
|
#### Props: ToggleButton
|
|
720
765
|
|
|
@@ -725,6 +770,315 @@ export default () => (
|
|
|
725
770
|
| asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
726
771
|
| onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
|
|
727
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
|
|
1073
|
+
|
|
1074
|
+
| Name | Type | Default | Description |
|
|
1075
|
+
| --- | --- | --- | --- |
|
|
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. |
|
|
1081
|
+
|
|
728
1082
|
### Example: Action buttons
|
|
729
1083
|
|
|
730
1084
|
Action buttons
|
|
@@ -827,19 +1181,20 @@ export default () => (
|
|
|
827
1181
|
</div>
|
|
828
1182
|
```
|
|
829
1183
|
|
|
830
|
-
#### Props
|
|
1184
|
+
#### Props: Base button props
|
|
1185
|
+
|
|
1186
|
+
### Base button props
|
|
831
1187
|
|
|
832
1188
|
| Name | Type | Default | Description |
|
|
833
1189
|
| --- | --- | --- | --- |
|
|
834
1190
|
| disabled | boolean | false | Whether the button should be disabled. |
|
|
835
1191
|
| active | boolean | false | Set the button toggled. Should be used in combination with "asToggle" prop. |
|
|
836
|
-
| type | 'button' \| 'submit' | 'button' | Defines the type of the button. This may be used for form submit buttons. |
|
|
837
1192
|
| iconOnly | boolean | false | Use when the content of the button is an icon only to adapt the button spacing accordingly. |
|
|
838
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. |
|
|
839
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. |
|
|
840
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. |
|
|
841
1196
|
| block | boolean | false | Defines whether the button takes up the full width of the parent element. |
|
|
842
|
-
| bsStyle | BUTTON_STYLE |
|
|
1197
|
+
| bsStyle | BUTTON_STYLE | 'default' | Sets the button style. Possible values are: default, unstyled, primary, secondary, info, warning, danger, success, muted and muted-filled |
|
|
843
1198
|
| bsSize | BUTTON_SIZE | — | Sets the button size. Possible values are: xs, sm, md and lg |
|
|
844
1199
|
| variant | BUTTON_VARIANT | — | Sets the button variant. Possible values are: link, link-inline, outline and action |
|
|
845
1200
|
| noRippleEffect | boolean | — | Whether the "ripple" effect should be suppressed on this button. |
|
|
@@ -854,6 +1209,7 @@ export default () => (
|
|
|
854
1209
|
| --- | --- | --- | --- |
|
|
855
1210
|
| asToggle | false | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
856
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. |
|
|
857
1213
|
|
|
858
1214
|
#### Props: ToggleButton
|
|
859
1215
|
|
|
@@ -862,4 +1218,16 @@ export default () => (
|
|
|
862
1218
|
| Name | Type | Default | Description |
|
|
863
1219
|
| --- | --- | --- | --- |
|
|
864
1220
|
| asToggle | true | false | Use the button as a toggle button. The toggle state can be controlled via the active prop. |
|
|
865
|
-
| onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
|
|
1221
|
+
| onClick | (value: boolean) => void | — | Callback function triggered when clicking the button. |
|
|
1222
|
+
|
|
1223
|
+
#### Props: Link element buttons
|
|
1224
|
+
|
|
1225
|
+
### Link element buttons
|
|
1226
|
+
|
|
1227
|
+
| Name | Type | Default | Description |
|
|
1228
|
+
| --- | --- | --- | --- |
|
|
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. |
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
*Category:* Components
|
|
4
4
|
*Section:* Interaction
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud
|
|
6
|
-
*Captured:* 2026-02-
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#/components/buttonToolbar
|
|
6
|
+
*Captured:* 2026-02-23T15:48:09.017Z
|
|
7
7
|
|
|
8
8
|
The ButtonToolbar is a utility component designed to simplify usage and alignment. Its purpose is to ensure consistent spacing.
|
|
9
9
|
|