Components
IconButton
Code

IconButton

IconButton(props): null | ReactElement<any, string | JSXElementConstructor<any>>

A button designed specifically for usage with a single icon.

Parameters

NameType
propsIconButtonProps & RefAttributes<HTMLButtonElement (opens in a new tab)>

Returns

null | ReactElement<any, string | JSXElementConstructor<any>>

Example

<IconButton label="Delete">
  <IconTrash />
</IconButton>
import React from 'react'
import { IconButton } from '@vtex/shoreline-components'
import { IconTrash } from '@vtex/shoreline-components'
export default function App() { return (<><IconButton label="Delete"> <IconTrash /></IconButton></>)}

Defined in

node_modules/.pnpm/@types+react@18.2.14/node_modules/@types/react/ts5.0/index.d.ts:355