field
fulldev-ui/fieldFreeComponent
fulldev/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by fulldev/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.full.dev/r/field.jsonSource
1---2import type { HTMLAttributes } from "astro/types"3import { cva, type VariantProps } from "class-variance-authority"45import { cn } from "@/lib/utils"67type Props = HTMLAttributes<"div"> & VariantProps<typeof variants>89const variants = cva(10 "data-[invalid=true]:text-destructive group/field flex w-full gap-3",11 {12 variants: {13 orientation: {14 vertical:15 "flex-col [&>.sr-only]:w-auto [&>:not([role=checkbox]):not([role=radio])]:w-full",16 horizontal:17 "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",18 responsive:19 "flex-col @md/field-group:flex-row @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto [&>:not([role=checkbox]):not([role=radio])]:w-full @md/field-group:[&>:not([role=checkbox]):not([role=radio])]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",20 },21 },22 defaultVariants: {23 orientation: "vertical",24 },25 }26)2728const { class: className, orientation = "vertical", ...props } = Astro.props29---3031<div32 role="group"33 data-slot="field"34 data-orientation={orientation}35 class={cn(variants({ orientation }), className)}36 {...props}37>38 <slot />39</div>
What it pulls in
Other registry items
Files it writes
More from fulldev/ui
All 144 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | fulldev/ui | Components | Free | 1 dep · 5 files | |
| alertalert | fulldev/ui | Components | Free | no deps · 5 files | |
| alert-dialogalert-dialog | fulldev/ui | Components | Free | 1 dep · 13 files | |
| avataravatar | fulldev/ui | Components | Free | no deps · 7 files | |
| badgebadge | fulldev/ui | Components | Free | no deps · 3 files | |
| bannerbanner | fulldev/ui | Components | Free | no deps · 3 files | |
| breadcrumbbreadcrumb | fulldev/ui | Components | Free | no deps · 8 files | |
| buttonbutton | fulldev/ui | Components | Free | no deps · 3 files |
