Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Display

Result <pm-result>

Result: what happened after an action, as a whole block. Payment went through, the import failed, the page is missing, access is denied.

Full screen
View order Back to the shop Try again Ada Lovelace, (no email), London

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/alert'; import '@prismora/elements/button'; import '@prismora/elements/icon'; import '@prismora/elements/result'; import { registerIcons } from '@prismora/elements/icon'; import { fileX } from '@prismora/icons'; registerIcons([fileX]); </script> <pm-result status="success" heading="Payment received" description="We emailed your receipt. Your order ships within two working days."> <pm-button>View order</pm-button> <pm-button variant="outline" tone="neutral">Back to the shop</pm-button> </pm-result> <pm-result status="error" code="Error 500" heading="The import failed" description="Row 214 has no email address. Nothing was imported."> <pm-icon slot="icon" name="file-x"></pm-icon> <pm-button>Try again</pm-button> <pm-alert slot="extra" tone="neutral" heading="contacts.csv, row 214">Ada Lovelace, (no email), London</pm-alert> </pm-result>

Overview

status picks the icon and colour. Put the next steps (buttons, links) in it. An error is announced at once (role="alert"), the others politely. For a list with nothing in it yet, use <pm-empty-state>.

Attributes

AttributeTypeDefaultDescription
status'success' | 'error' | 'warning' | 'info'—Outcome: sets the icon and the colour (default info).
headingstring—The headline, e.g. "Payment received".
descriptionstring—One or two sentences under the headline.
codestring—A short code above the headline, e.g. "404" or "Error 500".
iconstring—Registered icon name instead of the status icon (see registerIcons).
heading-level
prop: headingLevel
number—Heading level of the headline, 1 to 6 (default 2). Use 1 when the result is the whole page.

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Slots

SlotDescription
(default)Actions: what the person can do next.
iconYour own icon or illustration.
extraDetails under the actions (an order summary, an error log).

CSS parts

PartDescription
::part(base)The block.
::part(icon)The icon circle.
::part(actions)The row of actions (drawn only when there are any).
::part(extra)The details under the actions (drawn only when there are any).

Used in templates

Sign inCreate accountTwo-step verificationForgot passwordChoose a new passwordCheckoutLanding pageArticleContactComing soonServer error (500)Onboarding wizardAppointment bookingFeedback survey