Components
Backdrop

Backdrop

The Backdrop component is used to create a backdrop overlay for modal or pop-up content.

Props

NameTypeDefaultDescription
childrenReact.ReactElementThe content to display within the backdrop.
onClick() => voidThe callback function to execute on click.

Try It

import { Backdrop } from '@kloktun/uikit'

export default function BackdropExample() {
  const handleBackdropClick = () => {
    // Handle backdrop click
    console.log('Backdrop clicked');
  };

  return (
    <Backdrop onClick={handleBackdropClick}>
      <div className="modal-content">
        {/* Modal content goes here */}
      </div>
    </Backdrop>
  );
}