IconButton

Icon button component with set of default icons and options to render any icon

Installation

import { IconButton } from 'uxp/components';

Signature

const IconButton: React.FunctionComponent<IIconButtonProps>

Examples

<IconButton
     type="search"
     onClick={()=> {alert("Clicked")}}
     className="custom-css-class"
 />
<IconButton
     icon="fas search"
     ...
 />

Properties

Name
Type
Mandatory
Default Value
Example Value

icon

No

-

-

type

No

-

-

active

boolean

No

-

-

disabled

boolean

No

-

-

onClick

(e?: React.MouseEvent) => void | Promise

No

-

-

onError

(e: React.MouseEvent) => void

No

-

-

className

string

No

-

-

borderless

boolean

No

-

-

buttonType

"button" | "submit" | "reset"

No

-

-

variant

'primary' | 'secondary' | 'danger'

No

-

-

size

No

-

-

Last updated