Field API
Every prop of the 10 parts Field exports, plus the 1 symbol it exports alongside them, generated from the package manifest.
import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle } from '@oceanic-hub/brand-system'- Layer
- core — shadcn-derived primitives.
- Exports
- Field · FieldContent · FieldDescription · FieldError · FieldGroup · FieldLabel · FieldLegend · FieldSeparator · FieldSet · FieldTitlealso: fieldVariantstypes: FieldErrorProps · FieldLegendProps · FieldProps · FieldSeparatorProps · FieldSetProps
- Variants
- orientation: vertical | horizontal | responsive
- variant: label | legend
- Contract
- packages/brand-system/src/components/field.contract.test-d.ts
- Demos
- 11 on the Field page — rendered live, hydrated
- Source
- packages/brand-system/src/components/field.tsx
Generated from manifest/component-manifest.json, so it cannot drift from the source. For what Field is for, how it composes and what it looks like, see Field.
Field
FieldProps
Prop
Type
Also accepts everything from React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof fieldVariants>.
FieldContent
A styled <div> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
FieldDescription
A styled <p> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
FieldError
FieldErrorProps
Prop
Type
Also accepts everything from React.HTMLAttributes<HTMLDivElement>.
FieldGroup
A styled <div> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
FieldLabel
A styled <label> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
FieldLegend
FieldLegendProps
Prop
Type
Also accepts everything from React.HTMLAttributes<HTMLLegendElement>.
FieldSeparator
FieldSeparatorProps
Prop
Type
Also accepts everything from React.HTMLAttributes<HTMLDivElement>.
FieldSet
A styled <fieldset> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
FieldTitle
A styled <div> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
fieldVariants
A cva class builder. It returns the class string for a set of variants, so a foreign element can wear this component's surface — a link styled as a button, an AlertDialogAction styled as a destructive one. An advanced move: reach for the component first.
(props?: ({ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined): stringParameters
Prop
Type
Variant axes
Read off the component's own cva config, so this table and the parts that consume it cannot disagree.
Prop
Type