Skip to main content

Field API Overview

Initialization

<script>
import { Field, Control } from "wx-svelte-core";
</script>

<!-- the Field control contains another control and provides a label for it -->
<!-- the field and the control inside are linked by the id -->
<Field label="Text" let:id >
<Control {id} />
</Field>
tip
  • Visit the Features Guide to learn more about the control's functionality.
  • Explore the samples to visualize the available features.

Field Properties

errordefines whether error styling is applied to the control's label
labelsets a label for the control inside a field
positionsets the position of a label relative to the control
typesets the control's type for correct positioning of a left-side label
widthsets the width needed for a field to nest a control