Go Main page
Go Main page

Web components

cover

components

Media button

v.1.0.0 | Saturn

Usage

import { MediaButton } from '@kubit-ui-web/react-components'
1
<MediaButton variant="DEFAULT" hasBackground="true" icon={{ icon: 'CLOSE', altText: 'First icon' }} size="LARGE" twistedIcon={{ icon: 'CARD', altText: 'Second icon' }} loader={{ altText: 'Loader' }} />

Props

Let's delve into the versatility of the mediaButton component by examining its available props:

PropertyTypeDefaultDescription
aria-hiddenBooleanFalseAdd aria hidden for button container
disabledBooleanFalseProp disable for button container
hasBackgroundBoolean-Apply or not a background
icon
Required
IElementOrIcon-Icon showed
loaderILoader-Loader showed when loading is true
loadingBoolean-Option to show the loader
size
Required
MediaButtonSizeType-MediaButton Icon size
tabIndexNumber-Tab index for button container
twistedBoolean-When false shows icon, when true, twistedIcon
twistedIconIElementOrIcon-Icon to transition when you click on the main icon
variant
Required
String-MediaButton variant
onClickReact.MouseEventHandler<HTMLButtonElement>-Function called when the image is clicked
ctvObject-Object used for update variant styles