thunderbird / thunderbird/services-ui

TextInput should accept a Vue component as an error

Open
#196 1 comment 0 reactions 1 assignee View on GitHub

@devmount is already working on this.

Since Sep 15, 2026.

enhancement
Dominant language
Vue
Stars
9
Forks
1
Avg merge
6h 58m
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
Currently, the error prop is a string which limits us on what we can show. For example, if we need an error that is a more complex component with a <router-link /> in it, it is currently not possible to do so.

I believe this will be a common-ish use-case so we should be able to accept a component and inject it as is for better flexibility.

Also, I can't externally manipulate the invalid prop either so if I want to show a custom component as an error somewhere else (like a notice-bar, for example) and still mark the input as invalid, it can't be done as of now.

Describe the solution you'd like
It would be nice to be able to pass in a custom component to the error prop so that we can show the proper input error styles and be more flexible on its usage.

Describe alternatives you've considered
Rendering a component elsewhere and manipulating the invalid prop. This is not currently possible but even if it was it would be quite hacky IMHO since one would need to externally manipulate the style of the error to look like the standard TextInput.

Additional context
Related PR https://github.com/thunderbird/thunderbird-accounts/pull/435

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.