GhostField reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Compound field primitive connecting GhostFieldLabel, GhostFieldDescription, GhostFieldError, and GhostFieldControl to a single control via useGhostId and scoped slot props. Composes with GhostInput, GhostTextarea, and GhostCheckbox without API changes.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
disabled | boolean | false | No | Propagates disabled semantics to the control. |
id | string | — | No | Optional control id override for label association. |
invalid | boolean | — | No | Propagates invalid semantics and root data-state. |
name | string | — | No | Canonical dot-path key associating this field with an ancestor `GhostForm`. |
required | boolean | false | No | Propagates required semantics to the control. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
default | Field parts (label, description, control, error) in consumer-chosen order. |
Slot props: default
| Name | Type | Description |
|---|---|---|
dirty | boolean | Slot prop `dirty`. |
error | string | undefined | Slot prop `error`. |
errors | readonly string[] | Slot prop `errors`. |
invalid | boolean | Slot prop `invalid`. |
touched | boolean | Slot prop `touched`. |
Exposed members
| Name | Type | Description |
|---|---|---|
element | HTMLElement | null | Root grouping element after mount. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | root | Grouping container on GhostField. |
data-part | label | Rendered by GhostFieldLabel. |
data-part | description | Rendered by GhostFieldDescription. |
data-part | error | Rendered by GhostFieldError when the slot has content. |
data-part | control | Scoped slot bridge from GhostFieldControl (no DOM host). |
data-state | invalid | Root invalid state; wins over disabled. |
data-state | disabled | Root disabled state when not invalid. |
CSS variables
None declared.
Accessibility
Role: generic. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/textfield/.
Required ARIA attributes: aria-describedby, aria-invalid.
Keyboard
None declared.
Verification
Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.
| Category | Status | Evidence |
|---|---|---|
| Automated keyboard | Not reviewed | No declared key is mapped to a browser test yet. |
| Manual interaction | Not reviewed | No review recorded. |
| Assistive technology | Not reviewed | No review recorded. |
Examples
field/billing-address-headless
The same native fieldset recipe with headless GhostField parts and consumer-owned styles.
field/basic
Label, hint, and control id wiring for GhostInput.
field/invalid
Required filter with error copy and aria-invalid.
field/textarea
GhostTextarea composed with description.
field/themed
Default vertical spacing from @ghostvue/themes.