Svelte Helper Text - Bitblue

Helper text under form fields for hints, validation messages, and descriptions

Helper text under form fields for hints, validation messages, and descriptions. Pair with aria-describedby on the control.

Setup

<script lang="ts">
	import { Helper, Input, Label } from '.';
</script>

Default

We’ll never share your email.

<script lang="ts">
	import { Helper, Input, Label } from '.';
</script>

<Label for="email" class="mb-2">Your email</Label>
<Input id="email" type="email" placeholder="name@company.com" aria-describedby="email-help" />
<Helper id="email-help">We’ll never share your email.</Helper>

Colors

Theme colors: primary, secondary, gray (default), red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose.

Your password is strong.

Username already taken.

Tip: use a unique passphrase.

<Helper color="green">Your password is strong.</Helper>
<Helper color="red">Username already taken.</Helper>
<Helper color="blue">Tip: use a unique passphrase.</Helper>

Accessibility

  • Set a stable id on Helper and point the control’s aria-describedby at it.
  • Use color="red" (or similar) for errors and keep the message text explicit.
  • Prefer short, actionable copy.

Props

PropTypeDefaultDescription
childrenSnippet—Helper message content
colortheme colorgrayText color token
idstring—For aria-describedby
classClassValue—Extra classes
...restHTML <p> attrs—Other paragraph attributes

© 2026 Bitblue is a registered trademark. All Rights Reserved.