docs/components/feedback/ErrorBanner

ErrorBanner

Error, warning, and info banners.

import { ErrorBanner } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#More Examples

No Dismiss

<ErrorBanner message="This banner cannot be dismissed." variant="error" />

#Props

PropTypeDefaultDescription
message *stringMessage text to display.
onDismiss() => voidCallback when the dismiss button is clicked.
variantErrorBannerVariant'error'Visual style variant.
classstringAdditional CSS classes.
autoDismissMsnumberAuto-dismiss after timeout in milliseconds. 0 or undefined means no auto-dismiss.
actionErrorBannerActionOptional action button (e.g. "Retry").

* required prop.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-bg-primary
  • --sk-duration-fast
  • --sk-duration-slow
  • --sk-error
  • --sk-icon-lg
  • --sk-info
  • --sk-radius-lg
  • --sk-radius-md
  • --sk-radius-sm
  • --sk-shadow-md
  • --sk-space-md
  • --sk-space-px
  • --sk-space-sm
  • --sk-space-xs
  • --sk-text-sm
  • --sk-warning