Field
glasswave/fieldFreeComponent
"Form field primitives: label, hint, and error."
Live preview
live · rendered by the registry
Rendered by glasswave on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glasswave.denizisik.com/r/field.jsonSource
1"use client";23import { forwardRef } from "react";4import { cn } from "@/lib/utils";5import { Label } from "@/components/ui/label";67export function FieldGroup({8 className,9 ...props10}: React.ComponentProps<"div">) {11 return (12 <div13 data-slot="field-group"14 className={cn("flex flex-col gap-6", className)}15 {...props}16 />17 );18}1920export function Field({ className, ...props }: React.ComponentProps<"div">) {21 return (22 <div23 data-slot="field"24 className={cn("flex flex-col gap-2", className)}25 {...props}26 />27 );28}2930export const FieldLabel = forwardRef<31 React.ElementRef<typeof Label>,32 React.ComponentPropsWithoutRef<typeof Label>33>(({ className, ...props }, ref) => (34 <Label35 ref={ref}36 data-slot="field-label"37 className={cn(className)}38 {...props}39 />40));41FieldLabel.displayName = "FieldLabel";4243export function FieldDescription({44 className,45 ...props46}: React.ComponentProps<"p">) {47 return (48 <p49 data-slot="field-description"50 className={cn("text-sm text-current/65 leading-relaxed", className)}51 {...props}52 />53 );54}5556export function FieldError({ className, ...props }: React.ComponentProps<"p">) {57 return (58 <p59 data-slot="field-error"60 role="alert"61 className={cn("text-sm font-medium text-[#FF3B30]", className)}62 {...props}63 />64 );65}
What it pulls in
Other registry items
Files it writes
More from glasswave
All 60 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | glasswave | Components | Free | 2 deps | |
| Alertalert | glasswave | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | glasswave | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | glasswave | Components | Free | 1 dep | |
| Avataravatar | glasswave | Components | Free | 1 dep | |
| Badgebadge | glasswave | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | glasswave | Components | Free | 2 deps | |
| Buttonbutton | glasswave | Components | Free | 2 deps |
