Skip to content
Latestv1.0.60

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.

Basic Usage

Different Statuses

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

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.

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.

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.