Skip to Content
🎉 Coral x Panda has been released 🎉 Read the Migration Guide
DocumentationAtomsErrorMessage

ErrorMessage

Basic Usage

import { ErrorMessage } from '@krakentech/coral'; <ErrorMessage message="Invalid email address" />
Error

Invalid email address

Properties

withIcon

<ErrorMessage message="Invalid email address" withIcon={false} />

Invalid email address

Full API

NameTypeDefault
messageReactNode

The message to display.

withIconboolean

If true, the ErrorMessage will be displayed with an icon.

true
iconTitlestring

Title for the icon (for accessibility)

attributesAttributes

This prop can be used to pass HTML attributes directly to the component. We currently allow passing data-* and aria-* attributes and the id. However, you can pass anything else with a type hack if necessary since this object is despread in to the component, without filtering its content.

Example usage:

AttributesProps: { 'id': 'close-button', 'aria-label': 'Close button', 'data-testid': 'close-button' };
Last updated on