Skip to content
SENVENLI UI

Close button

The icon-only button that closes a dialog, sheet, banner or panel, named "Close" in the current language.
Close
import { CloseButton } from "@senvenli/react/action";

Examples

A specific name

When several close buttons share a view, each says what it closes.

Guidelines

When to use it

  • Closing a surface that can be dismissed.

Use something else when

  • The action does more than dismiss, or needs a visible label. Button

Accessibility

Built in

  • Named "Close" from the component strings.

You provide

  • A more specific label when several close buttons share a view.

API reference

CloseButton

radius
ComponentRadius

Corner radius: none, small, medium (the design), large or full (a pill). The provider's default otherwise.

tone
ButtonTone

danger for a destructive action (delete, discard); it keeps the variant's shape.

fullWidth
boolean

As wide as its container (a form's submit on a phone, a stacked set of actions).

size
ButtonSizeDefault "small"
aria-label
string

Overrides the localized "Close" name.

Also takes 83 standard DOM and ARIA attributes (id, aria-label, event handlers…).