Skip to content

Icon Button

The Icon Button is an interactive component that wraps an icon inside a button element. It supports event handling, accessibility, making it suitable for actions in menus, carousel, overlay, etc.

Icons reference icons. The IconButtonProperties extends <React.HTMLAttributes<HTMLButtonElement> which means it includes all standard HTML attributes that can be applied to an HTML Button element.

PropTypeDescriptionOptional
iconNameToyotaIcon | LexusIconThe rendered Icon inside button component from the library
sizeSizeDefines the size of the button
isOutlinedbooleanDisplay the button with outlined style (no border, no background-color)
isNeutralbooleanDisplay the button with neutral style
classNameClassValueCustom classNames you want to apply on the button element
screenReaderTextstringAccessibility label used for screen readers
import { IconButton } from '@tmedxp/react-components';
const IconButtonExample = () => {
return (
<IconButton
iconName="travel"
size="lg"
isOutlined={true}
isNeutral={true}
/>
);
};
export { IconButtonExample };
  • Try the Icon Button component in storybook: