Components · Feedback
Result
A full-block outcome state — success, error, info, warning, 404, 403 or 500 — with an icon, title and actions.
Examples
Status
Outcome state · success (with an action) · error · 403 · 500 · custom icon
<!-- Paste-and-run: save as .html and open in a browser. No build step.
<aha-result> is the SAME shared custom element React and Vue consume — here in its native
form. Its status glyph is the shared <aha-icon>, loaded automatically by the element.
Theming comes only from the --aha-* tokens in tokens.css. -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ahaslides-product/ahaslides-design@master/lib/tokens.css">
<script type="module">
import 'https://cdn.jsdelivr.net/gh/ahaslides-product/ahaslides-design@master/lib/aha-result.js'; // registers <aha-result> (+ <aha-icon>)
import 'https://cdn.jsdelivr.net/gh/ahaslides-product/ahaslides-design@master/lib/aha-button.js'; // registers <aha-button>
</script>
<!-- status: success | error | info | warning | 404 | 403 | 500 -->
<aha-result status="success" result-title="Presentation published" subtitle="Share the join link with your audience.">
<aha-button slot="extra" variant="primary">Copy join link</aha-button>
</aha-result>
<!-- a not-found / forbidden / server route -->
<aha-result status="404" result-title="Presentation not found" subtitle="It may have been deleted or the link is wrong.">
<aha-button slot="extra" variant="primary">Back to dashboard</aha-button>
</aha-result>
<!-- override the status glyph with any DS icon by name -->
<aha-result status="warning" icon="system-shield-warning" result-title="Verify your account"
subtitle="Confirm your email to keep presenting."></aha-result>
import '@ahaslides-product/design/aha-result'; // registers <aha-result> (+ <aha-icon>)
import '@ahaslides-product/design/aha-button';
// Attributes only — no events — so React 18/19 can render the element directly.
function AhaResult({ status, title, subtitle, children }) {
return (
<aha-result status={status} result-title={title} subtitle={subtitle}>
{children}
</aha-result>
);
}
// usage
<AhaResult status="success" title="Presentation published" subtitle="Share the join link with your audience.">
<aha-button slot="extra" variant="primary">Copy join link</aha-button>
</AhaResult>
// main.ts — register the elements + mark aha-* as custom elements
import '@ahaslides-product/design/aha-result'; // registers <aha-result> (+ <aha-icon>)
import '@ahaslides-product/design/aha-button';
app.config.compilerOptions.isCustomElement = (tag) => tag.startsWith('aha-');
// Component.vue
<template>
<aha-result
status="success"
result-title="Presentation published"
subtitle="Share the join link with your audience."
>
<aha-button slot="extra" variant="primary">Copy join link</aha-button>
</aha-result>
</template>
API
| Prop | Type | Default | Notes |
|---|---|---|---|
status | success | error | info | warning | 404 | 403 | 500 | info | Outcome — picks the glyph and colour |
result-title | string | — | The headline message |
subtitle | string | — | Optional supporting line under the title |
icon | string (DS icon name) | — | Overrides the status glyph with any DS icon (e.g. system-shield-warning) |
Install
# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} # a GitHub token with read:packages
npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css'; // once, at the app root
import '@ahaslides-product/design/aha-result'; // registers <aha-result>
Agent feed for this component (absolute, fetchable anywhere): result.agent.json · result.md · result.llms.txt
When to use
When to use
- Result — a full-block outcome after an operation or a not-found/empty route (with a next action)
- Alert — an inline, in-context banner that stays in the layout (feedback pattern)
- Toast — a transient, auto-dismissing confirmation
Reserve Result for a whole-region outcome — lead with the glyph + a clear title, keep the subtitle to one line, and give a primary next action in slot="extra". For an in-context message use an Alert; for a transient confirmation use a Toast.
Surfaces
editor dashboard audience
Spec
Icon 48px DS glyph, coloured by status (or an `icon` override) · Success check-circle · #16C49A · Error / 500 x-circle / cloud-disconnected · #F5222D · Warning / 403 warning-circle / lock · #FF7747 · Info / 404 info / magnifying-glass · #9BB3E9 · Title 24/32 SemiBold #1A1A1A, centred · Subtitle 14/21 Regular #8A8A8A