Skip to content
W WRNexusJS
content component

FormErrorSummary

Reusable form error summary component.

@wrnexus/ui 0.2.673 props1 slots0 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<FormErrorSummary
  title="Please fix the following"
  visible="true"
/>

Legacy mount name: data-component="FormErrorSummary".

Props and attributes

PropTypeRequirementDefault
classstringOptional""
titlestringOptional"Please fix the following"
visiblebooleanOptionaltrue

Slots

  • default

Events

This component does not declare a custom event.

Source contract

Installed source: components/FormErrorSummary.wrn

component FormErrorSummary {
  props {
    class = ""
    title = "Please fix the following"
    visible = true
  }
  view {
        <section data-show="visible" role="alert" aria-live="polite" class="rounded-2xl border border-red-200 bg-red-50 p-4 text-red-900 dark:border-red-900/60 dark:bg-red-950/40 dark:text-red-200 {class}">
        <h3 class="font-semibold">{title}</h3>
        <div class="mt-2 text-sm">
        <slot />
        </div>
        </section>
    }
}