Forms
Navigation & layout
Data display & feedback
Date & time
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.jsonPreview
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.jsonGitHub 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.jsonUsage
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`.
| Prop | Type | Default |
|---|---|---|
| className | string | — |
Notes
- Installing `error-message` also pulls `field-error`.