Skip to content

Browse components

← All components

Error Message

Alias for FieldError — same component, different export name.

Install
npx shadcn@latest add https://ui.anuragroy.dev/r/error-message.json

Preview

Loading preview…

Installation

Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.

Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/error-message.json

GitHub fallback if the website is down:

Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/error-message.json

Usage

Import paths follow your components.json aliases. After install, the default path is @/components/ui/error-message.

Import
import { ErrorMessage } from "@/components/ui/error-message"
example.tsx
import { ErrorMessage } from "@/components/ui/error-message"export function Example() {  return <ErrorMessage>Something went wrong.</ErrorMessage>}

API Reference

ErrorMessage

Re-exports `FieldError`.

PropTypeDefault
classNamestring—

Notes

  • Installing `error-message` also pulls `field-error`.