Skip to content

Design system

Documentation

DesignComponents / Result

Components / Result

Beta

Result

Present a clear outcome when an important flow finishes.

On this page

Examples

End-of-flow outcomes

Use a clear result for a completed workflow, with a concise explanation and optional next action.

Workspace created

Your team can now add members and projects.

Import failed

Check the file format and correct the listed errors before trying again.

Project not found

The link may be out of date, or you may not have access.

Success, error, and not-found results

Try the props

Compare outcome semantics and an optional next action.

Workspace created

Your team can now add members and projects.

Result property playground

When to use

Use Result for a completed success, failure, or not-found state that deserves a focused explanation. For an inline issue, use Alert; for a transient message, use Toast.

Usage

import { Result } from "@phuctech/ui/components/result";

<Result status="success" heading="Workspace created" description="Your team can now add projects." />

API

Component API
PropTypeDefaultDescriptionConstraints
status"success" | "error" | "not-found""success"Selects semantic icon and status color.The heading must state the outcome; color is supplementary.
headingstringrequiredVisible result heading and named-region label.Keep it concise and specific.
descriptionReactNode—Optional explanation of what happened or what to do next.Do not expose sensitive error details.
iconReactNode | nullstatus iconOverrides the decorative status icon; null hides it.The textual heading carries the result meaning.
actionReactNode—Optional next action group.The feature owns navigation and retry behavior.
children / section propsReactNode / HTMLSectionElement props—Additional content and native section attributes.Keep the result focused on one outcome.

Tokens

Component tokens
TokenRoleEffective valueUsage
success / danger / warningStatus iconSemantic colorsCommunicates status in addition to the visible heading.
muted / foregroundIcon surface and textSemantic surfacesMaintains contrast across themes.

Accessibility

Result is a named region whose heading is rendered at level two, so it can sit beneath the page heading or alongside other results. Its icon is hidden from assistive technology; all meaning remains in text.

Do and don’t

Do

Give people a clear outcome and a relevant way forward.

Don’t

Replace an actionable field error or a transient status with a full result screen.

  • Alert is inline, persistent feedback.
  • Toast is non-blocking transient feedback.
  • EmptyState explains a collection with no content.