UNPKG

@mozaic-ds/vue

Version:

Mozaic-Vue is the Vue.js implementation of ADEO Design system

26 lines (19 loc) 1.89 kB
# MField A field label is a text element that identifies the purpose of an input field, providing users with clear guidance on what information to enter. It is typically placed above the input field and may include indicators for required or optional fields. Field Labels improve form usability, accessibility, and data entry accuracy by ensuring users understand the expected input. ## Props | Name | Description | Type | Default | | --- | --- | --- | --- | | `id*` | A unique identifier for the form field, used to associate the label with the form element. | `string` | - | | `label*` | The text displayed as the label for the form field. | `string` | - | | `requirementText` | Additional text displayed alongside the label, typically used to indicate if the form field is required or optional | `string` | - | | `helpText` | Text shown below the form field to provide additional context or instructions for the user. | `string` | - | | `helpId` | The value of the `id` attribute set on the **helpText** element. _This value is mandatory when using a helpText in order to guarantee the accessibility of the component._ | `string` | - | | `isValid` | If `true`, applies a valid state to the form field. | `boolean` | - | | `isInvalid` | If `true`, applies an invalid state to the form field. | `boolean` | - | | `isLoading` | If `true`, applies a loading state to the form field. | `boolean` | - | | `messageId` | The value of the `id` attribute set on the **validationMessage** element. _This value is mandatory when using a validationMessage in order to guarantee the accessibility of the component._ | `string` | - | | `message` | message displayed when the form field has a valid or invalid state, usually indicating validation or errors. | `string` | - | ## Slots | Name | Description | | --- | --- | | `default` | Use this slot to insert the form element of your choice |