import { ResultPage } from "capsomer/react/status-mark";
import "capsomer/panel.css";
import "capsomer/status-mark.css";
<ResultPage title="Unsubscribed" tone="ok" actions={<a href="/">Return to Example Co</a>}>
You have been unsubscribed.
</ResultPage>
Examples
Done
<div data-mount="done"></div>
A link that is not valid
<div data-mount="invalid"></div>
Asking first, with no mark
<div data-mount="confirm"></div>
API reference
StatusMark
Prop
Type
Required
Does
tone
MarkTone
Yes
ResultPage
Prop
Type
Required
Does
title
string
Yes
The page's h1: "Unsubscribed", "Link not valid".
titleHidden
boolean
Hide the h1 visually (a page whose sentence is its visible heading). Default false.
tone
MarkTone
The mark over the sentence; none while the page still asks (a confirm step).
children
ReactNode
Yes
The sentence: what happened. A polite status, so the result is announced after a post.
actions
ReactNode
The one action (a confirm button, its form) and the way back.
brand
ReactNode
The site's mark or wordmark above the card.
CSS variables
Variable
Default
--tone
var(--ok)
--tone-soft
var(--ok-soft)
Parts and data attributes
Class
Is
.cap-result
its own class
.cap-result-actions
its own class
.cap-result-body
its own class
.cap-result-text
its own class
.cap-result-title
its own class
.cap-status-mark
the root
Attribute
Values
data-tone
critinfookwarn
State
Read from
:focus
the platform
Accessibility
Key
Does
Tab
The site header, then the card's action and the way back
One main, one h1. The mark is aria-hidden; tone is never conveyed by the mark alone.