Icon Button

Icon buttons help users take supplementary actions with a single tap.

React

Is new design vision part implemented using new tokens?

Up to date

Resources

Storybook

Storybook failed to load. Please connect to the VPN to access.

                                                        
                                                        
                                                            import { IconButton } from '@optimus-web/core';
                                                        
                                                        <IconButton
                                                          variant="tertiary"
                                                        />
                                                        
                                                            

API

Name

Default

Description

accessibleText?

 

Add text that corresponds to the icon for accessibility purposes

disabled?

 

When true is gives the button it's disabled state

icon

 

Use IconName from @optimus-web/icons to add an icon inside the button

iconSize?

"small"

"small", "mediun"

loading?

"left"

Show a loading spinner

onClick?

 

Your unique onClick handler function

ref?

 

Adds your React.Ref to the button

size?

"medium"

"small", "medium", "large", "extraLarge"

variant?

"tertiary"

"destructive", "ghost", "primary", "secondary", "tertiary"