Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Custom inputs guide - how to emit events from the FormKit component?

Open
#140 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
documentation

Research direction

Start with the custom input guide at https://formkit.com/guides/create-a-custom-input and the Architecture section on emitting events, then review discussion 943 and its suggested solution. Done means the custom input guide explains the official event-emitting approach with a working code example and links to the related discussion if useful.

Written by the indexing model from the issue text.

Description

Related discussion and solution by @SuddenDev: https://github.com/orgs/formkit/discussions/943#discussioncomment-9893014

In regards to emitting events from a custom FormKit input. I lost a lot of time today trying to figure this out, I could not find any related documentation to point me in the right direction.
All I found was a one-line note in the 'Architecture' documentation: https://formkit.com/essentials/architecture#emitting-events

Just adding a small paragraph with a code example in the custom input guide (https://formkit.com/guides/create-a-custom-input) would go a long way.

Currently I will use the solution suggested in the discussion above, which is to call the context prop as a function (feels kind of weird, but it works)

My confusion was that Props has first-class support and was very easy to add from the context object, it took me 10 minutes. But for emitting our own events from the component, there is almost nothing :(

I'd love to know if there is an 'official' Formkit way to emit events from inputs? Am I doing this all wrong?

Thank you for the great work on FormKit! If there is anything I can do to help contribute, let me know. Maybe even adding a link to the Github discussion in the documentation, would already save someone else a lot of searching.

Cheers.

Dominant language
JavaScript
Stars
19
Forks
29
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from formkit/docs-content

All issues in formkit/docs-content

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.