Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@nature-ui/close-button

DNature13MIT2.1.13TypeScript support: included

A React and Nature UI close button component.

close-button, button, icon-button, react, close-icon, nature ui

readme

Close Button

CloseButton is essentially a button with a close icon. It is used to handle the close functionality in feedback and overlay components like Alerts, Toasts, Drawers and Modals.

Installation

yarn add @nature-ui/close-button

# or

npm i @nature-ui/close-button

Import component

import { CloseButton } from '@nature-ui/close-button';

Usage

<CloseButton />

Disabled

Pass the isDisabled prop to put the close button component in a disabled state.

<CloseButton isDisabled />

Sizes

Pass the size prop to adjust the size of the close button. Values can be sm, md or lg.

<>
  <CloseButton size='sm' />
  <CloseButton size='md' />
  <CloseButton size='lg' />
</>