Result
Feedback page for operation outcomes: the status determines the icon and coloring, with optional subtitle and action area.
Basic usage
Basic usage
Submission successful
Delivered as scheduled; important files are archived.
Submission failed
Network error: some content could not be saved.
Warning
Notice
import { LhResult, LhButton } from '@lh-ui/react'
export default function Demo() {
return (
<>
<LhResult
status="success"
title="Submission successful"
subTitle="Delivered as scheduled; important files are archived."
/>
<LhResult
status="warning"
title="Warning"
extra={<LhButton type="primary">Reload</LhButton>}
/>
</>
)
}
Result Props
| Prop | Description | Type | Options | Default |
|---|---|---|---|---|
| status | Result status (determines icon and coloring) | LhResultStatus | 'success' | 'warning' | 'info' | 'error' | 'info' |
| icon | Custom icon name (overrides the status default; empty string = no icon) | string | LhIcon set | — |
| iconSize | Icon size (passed to LhIcon) | string | number | — | 64 |
| title | Title | ReactNode | — | — |
| subTitle | Subtitle (rendered when provided) | ReactNode | — | — |
| extra | Bottom action area (buttons etc.) | ReactNode | — | — |
| sx | Shorthand layout props | SxProps | — | — |
Invalid status fallback
An invalid status falls back to info via the core whitelist; unknown --xxx modifier classes are never emitted.
Accessibility
The root element is role="status" (gentle announcement that does not interrupt screen readers); the icon area inherits LhIcon's accessibility semantics.
Styles
import '@lh-ui/react/style/result'