Skip to content

Result

Used to provide feedback on the results of a series of operations or tasks.

Basic Usage

Use icon, title, and sub-title to render a standard result state.

Operation Successful
Your order has been submitted successfully, expected delivery in 3-5 business days.
Basic Usage

Different Statuses

Switch between success, warning, error, and info via the icon prop.

Success
Submitted successfully
Warning
Please note this operation
Error
Submission failed, please try again
Information
This is a prompt message
Different Statuses

Custom Content

Use slots such as icon and extra to customize the result page. The default slot is typically used for action buttons.

📄
404
Sorry, the page you visited does not exist

Please check if the URL is correct, or return to home.

Custom Content

Use in Nuxt

YhResult works well in Nuxt 3/4 as a regular feedback component and also fits global error pages such as error.vue.

404
Sorry, the page you visited does not exist
Use in Nuxt (Mock error.vue)

API

Props

PropDescriptionTypeDefault
titleTitlestringundefined
sub-titleSub-titlestringundefined
iconResult icon type'success' | 'warning' | 'error' | 'info''info'
theme-overridesComponent-level theme variable overridesComponentThemeVarsundefined

Events

This component does not expose component events.

Slots

SlotDescription
defaultActions area
iconCustom icon content
titleCustom title content
sub-titleCustom sub-title content
extraExtra content area between sub-title and actions

Expose

This component does not expose public instance methods or properties.

Theme Variables

VariableDescriptionDefault
--yh-result-paddingContainer padding40px 30px
--yh-result-icon-sizeIcon size72px
--yh-result-icon-marginIcon margin bottom20px
--yh-result-title-sizeTitle font size20px
--yh-result-title-colorTitle colorvar(--yh-text-color-primary, #303133)
--yh-result-subtitle-sizeSub-title font size14px
--yh-result-subtitle-colorSub-title colorvar(--yh-text-color-secondary, #909399)

Type Exports

NameDescription
YhResultPropsComponent props type
YhResultSlotsComponent slots type
YhResultIconTypeResult icon union type
YhResultInstanceComponent instance type

Released under the MIT License.