Form Help Msg
A form help message displays supporting text below a form field, such as hints, validation errors, or additional context.
Usage
<script> import { FormLabel, TextInput, FormHelpMsg } from 'deskblocks'; </script> <div> <FormLabel for="email">Email</FormLabel> <TextInput id="email" placeholder="[email protected]" /> <FormHelpMsg>We will never share your email.</FormHelpMsg> </div>
Invalid state
Pass the invalid prop to render the message in the danger color, typically alongside an invalid input.
<div> <FormLabel for="email2">Email</FormLabel> <TextInput id="email2" invalid value="not-an-email" /> <FormHelpMsg invalid>Enter a valid email address.</FormHelpMsg> </div>
Disabled state
This field is currently unavailable.
<FormHelpMsg disabled>This field is currently unavailable.</FormHelpMsg>
Slots
default
Props
invalid | boolean | false | Renders the message in the danger color. |
disabled | boolean | false | Renders the message in the disabled color. |