Usage
CloseButton is a premade ActionIcon with close icon.
Component accepts the same props as ActionIcon
with additional iconSize prop to control icon width and height:
Accessibility
CloseButton does not have an associated label, set title or aria-label props to make it visible for screen readers:
CloseButton component props
| Name | Type | Description |
|---|---|---|
| color | MantineColor | Key of theme.colors |
| disabled | boolean | Indicates disabled state |
| gradient | MantineGradient | Controls gradient settings in gradient variant only |
| iconSize | number | Width and height of cross icon |
| loaderProps | LoaderProps | Props spread to Loader component |
| loading | boolean | Indicates loading state |
| radius | number | "xs" | "sm" | "md" | "lg" | "xl" | Button border-radius from theme or number to set border-radius in px |
| size | number | "xs" | "sm" | "md" | "lg" | "xl" | Predefined icon size or number to set width and height in px |
| variant | "outline" | "transparent" | "light" | "default" | "filled" | "subtle" | "gradient" | Controls appearance |