Documentation
Buttons

Buttons

Example

import {
	Button,
	PrimaryButton,
	DangerButton,
	IconButton,
} from '@i4o/catalystui'
 
export default () => {
	return (
		<div className='flex space-x-2'>
			<Button>Button</Button>
			<PrimaryButton>Primary Button</PrimaryButton>
			<DangerButton>Danger Button</DangerButton>
			<IconButton icon={<HomeIcon />} />
		</div>
	)
}

Props

NameTypeDefaultDescription
ariaLabelstringaria-label of the button
childrenReactNodeButton content
classNamestringAdditional class name
disabledbooleanDisabled state
loadingbooleanLoading state
loadingTextstringLoading text
onClick(event: MouseEvent) => voidClick handler
onMouseDown(event: MouseEvent) => voidMouse down handler
leftIconReactNodeLeft icon
rightIconReactNodeRight icon
textSizestringText size
tooltipstringTooltip text
typestringButton type

IconButton Props

Refer to Default Button Props. Icon Button also has the following props:

NameTypeDefaultDescription
iconReactNodeIcon

Variants

Left/Right Icons

States

Loading

Disabled