CloseButton
freeCloseButton dismisses compact surfaces with the shared icon-button behavior.
Invite sent
Jordan can now access the workspace.
Installation
Add this component with the NateUI CLI.
Examples
Basic
Absolute
Security reminder
Rotate API keys that have not been used this quarter.
Custom Icon
Reset Default Class
ActiveTrial
API
CloseButton renders a native button with a default X glyph when no custom children are supplied.
| Prop | Description | Type | Default |
|---|---|---|---|
absolute | Adds the absolute-positioning base class. Pair it with position classes such as right-3 top-3. | boolean | false |
children | Icon or content rendered instead of the default X glyph. | ReactNode | - |
resetDefaultClass | Removes the built-in size, color, hover, and feedback classes so className fully owns the look. | boolean | false |
className | Extra classes merged into the button. | string | - |
onClick | Called when the button is clicked. | CloseButtonClickHandler | - |
ref | Ref forwarded to the native button. | Ref<HTMLButtonElement> | - |
type | Native button type. | ButtonType | 'button' |
...nativeButtonProps | Native props for the underlying button, including aria-label and disabled. | NativeCloseButtonProps | - |