JSPM

@chakra-ui/close-button

0.0.0-dev-20220823195046
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 414857
  • Score
    100M100P100Q283712F
  • License MIT

A React and Chakra UI close button component.

Package Exports

  • @chakra-ui/close-button
  • @chakra-ui/close-button/dist/index.cjs.js
  • @chakra-ui/close-button/dist/index.esm.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@chakra-ui/close-button) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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 @chakra-ui/close-button

# or

npm i @chakra-ui/close-button

Import component

import { CloseButton } from "@chakra-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" />
</>