Skip to main content

CnNoteCard

Inline callout card for informational, warning, success, and error messages. A local patch of NcNoteCard from @nextcloud/vue that allows customization not possible upstream.

Wraps: NcIconSvgWrapper

Usage

<!-- Warning (default) -->
<CnNoteCard text="This action cannot be undone." />

<!-- With heading -->
<CnNoteCard type="error" heading="Save failed" text="Please check your input and try again." />

<!-- Success -->
<CnNoteCard type="success" text="Your changes have been saved." />

<!-- Info with slot content -->
<CnNoteCard type="info">
See the <a href="/docs">documentation</a> for details.
</CnNoteCard>

<!-- Force alert role for time-sensitive messages -->
<CnNoteCard type="warning" :show-alert="true" text="Session expires in 5 minutes." />

Props

PropTypeDefaultDescription
typeString'warning'Severity: 'success', 'info', 'warning', 'error'
textStringMessage text (use the default slot for rich content)
headingStringOptional bold heading above the message
showAlertBooleanForce role="alert" — use for messages requiring immediate attention. Always true when type="error"

Slots

SlotDescription
defaultRich message content (replaces text prop)
iconCustom icon replacing the default severity icon