Hesoyam

Error

Inline failure copy. Exported as HesoyamError so it does not collide with the built-in Error constructor.

Default

Default label is Error. The default slot is the message. role="alert" is already on the root.


        
1 <HesoyamError>This email address is already in use.</HesoyamError>

Custom label


        
1 <HesoyamError label="Email Error">
2 This email address is already in use.
3 </HesoyamError>

No label

Pass :label="false" when the surrounding field already names the problem.


        
1 <HesoyamError :label="false">
2 This email address is already in use.
3 </HesoyamError>

Sizes

small is 12px, medium is 13px, large is 16px. medium is the default.


        
1 <HesoyamError size="small">This email is in use.</HesoyamError>
2 <HesoyamError size="medium">This email is in use.</HesoyamError>
3 <HesoyamError size="large">This email is in use.</HesoyamError>

Error object

error.message fills the slot when you do not pass children. action is plain text unless link is set.


        
1 <HesoyamError
2 :error="{
3 message: 'The request failed.',
4 action: 'Contact Us',
5 link: 'https://vercel.com/contact',
6 }"
7 />

Best practices

  • HesoyamError is a line of copy next to a field or under a section, not a full-page boundary. Toasts cover transient save failures. Input's own error state covers a single invalid field.
  • Say what happened, then what to do. Skip "Oops", "Unfortunately", and "Unable to". User-state errors use Couldn't; system errors use Failed to.
  • Name the resource (Couldn't Load Deployments), not Something Went Wrong. Pair platform failures with a stable request or deployment id the user can copy.
  • :label="false" when a nearby Label already identifies the field. A custom label is for a named subsystem (Email Error, Billing Error).
  • The folder also exports Error and the legacy GeistError name as aliases of HesoyamError. New pages should import HesoyamError.
  • When the message appears after a failed request, wrap it in aria-live="polite". The component already sets role="alert".