BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/octane/field

Field

octane/field
FreeComponent

octane publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by octane on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/field.json

Source

ui/field.tsrxraw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/field.json · first 6 KB
1// Base UI base field — TRANSCRIBED from upstream's `bases/base-ui/ui/field.tsx` (maintainer-supplied),
2// class strings verbatim. Byte-for-byte the same component as the radix base apart from which
3// `Label` and `Separator` it imports.
4//
5// UPSTREAM DOES NOT USE THE `Field` PRIMITIVE HERE, even though @octanejs/base-ui ships one whose
6// parts line up exactly (Root/Control/Label/Description/Error/Validity/Item). That is worth stating
7// because the opposite is the natural guess, and it decides the class strings: `data-invalid` and
8// `data-disabled` on these elements are written by the CONSUMER, so `data-[invalid=true]:` and
9// `group-data-[disabled=true]/field:` are correct as written. Had this routed through `Field.Root`,
10// the primitive would emit BARE `data-invalid=""` (see fieldValidityMapping) and every one of those
11// variants would silently match nothing.
12//
13// It also means `FieldLabel` is safe standalone: it renders this base's plain `<label>`, not
14// `Field.Label`, which hard-requires a `<Field.Root>` ancestor and throws without one.
15//
16// Octane adaptations: "use client" dropped; Label/Separator come from this base's own ports;
17// FieldSeparator and FieldError compose their conditional children with createElement (a
18// `children && …` branch beside a sibling descriptor), everything else is template JSX.
19import { createElement, useMemo, type OctaneNode } from 'octane';
20import { cva, type VariantProps } from 'class-variance-authority';
21
22import { cn } from '@/lib/utils';
23import { Label } from '@/components/ui/label';
24import { Separator } from '@/components/ui/separator';
25
26type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
27
28export function FieldSet({ className, ...props }: Props) @{
29 <fieldset
30 data-slot="field-set"
31 className={cn(
32 'flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',
33 className,
34 )}
35 {...props}
36 />
37}
38
39export function FieldLegend({ className, variant = 'legend', ...props }: Props & {
40 variant?: 'legend' | 'label';
41}) @{
42 <legend
43 data-slot="field-legend"
44 data-variant={variant}
45 className={cn(
46 'mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base',
47 className,
48 )}
49 {...props}
50 />
51}
52
53export function FieldGroup({ className, ...props }: Props) @{
54 <div
55 data-slot="field-group"
56 className={cn(
57// … truncated

What it pulls in

npm packages

  • class-variance-authority

Other registry items

  • @octane/label
  • @octane/separator
  • @octane/utils

Files it writes

  • ui/field.tsrx

Facts

Registry
octane
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-11
Last confirmed
yesterday

Go to the source

Docs on octane octanejs.dev octanejs/octane on GitHub Raw registry item This item as JSON

More from octane

All 44 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionoctaneComponentsFree2 deps
AlertalertoctaneComponentsFree1 dep
Alert Dialogalert-dialogoctaneComponentsFree1 dep
Aspect Ratioaspect-ratiooctaneComponentsFreeno deps
AvataravataroctaneComponentsFree1 dep
BadgebadgeoctaneComponentsFree1 dep
BreadcrumbbreadcrumboctaneComponentsFree1 dep
ButtonbuttonoctaneComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex