made for Nordcraft

Close button context

A context provider that enables custom buttons to function as accessible close buttons for dismissible components. Automatically manages closing functionality for dialog, popover and toast close components.

  • Create fully customized close buttons

  • Works with dialog, popover and toast close components

Reference

  • Close button context

    A context provider that supplies close button functionality to child components.

    • Workflows

      • updateCloseButtonId

        Updates and registers the close button ID for dialog, popover and toast components to enable their closing functionality.

        Parameters
        • id
          string
          /
          default: -

          A unique identifier for the close button being registered. This ID is required and must be unique across all registered close buttons.