No Results Found
A prompt for inputs
<tk-hint text="I am a hint"></tk-hint>
<hr>
<tk-input
label-text="Labelled Input"
aria-describedby="labelled-input-hint"
></tk-input>
<tk-hint
id="labelled-input-hint"
text="I am an input hint"
></tk-hint>
<hr>
<tk-text-area
label-text="Labelled Text Area"
aria-describedby="labelled-text-area-hint"
></tk-text-area>
<tk-hint
id="labelled-text-area-hint"
text="I am a text area hint"
/>
tk-hint
is used to give prompts or information for inputs. They can be used in conjunction with inputs and labels (e.g. with a tk-input
and tk-label
)
<tk-hint text="Default state"></tk-hint>
<hr>
<tk-hint text="Error state" error></tk-hint>
The tk-hint
can be in an error state.
<tk-input type="password" value="**********************" class="l-block mb-2x"></tk-input>
<tk-hint text="Strong password" icon="checkmark-circle" icon-label="Checkmark inside circle icon"></tk-hint>
<hr>
<tk-input type="password" value="*****" class="l-block mb-2x" error></tk-input>
<tk-hint text="Weak password" icon="alert" icon-label="Alert icon" error></tk-hint>
The tk-hint
can have an icon preceding the text.
<tk-input type="password" value="**********************"></tk-input>
<tk-hint>
Here are some
<a href="https://www.password-help.com" class="l-inline-flex l-v-center">
tips on setting a strong password
<tk-icon name="external-link" size="xs" class="ml-2x" />
</a>
</tk-hint>
The tk-hint
will wrap and style arbitrary content, including HTML.
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
error |
error |
boolean |
false |
|
icon |
icon |
string |
null |
|
iconLabel |
icon-label |
When TkHint is configured to have an icon preceding the text, this prop is required to provide an alternative text for the icon that screenreaders can use | string |
undefined |
text |
text |
string |
undefined |