nuxt-x-affiliate
Ask Question
Reader-submitted question form for a product or article — POSTs to your endpoint and emits a submit event.
Ask Question
The XAFAskQuestion component is a small form that lets readers submit a question about a specific product or article. The form emits a submit event with the question payload, and can optionally POST to a server endpoint.
Components
<XAFAskQuestion />
<XAFAskQuestion
context="Wireless Keyboard K1"
:require-email="true"
endpoint="/api/questions"
@submit="onAsk"
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
endpoint | string | — | POST { question, email?, context } here. |
context | string | — | Optional label above the form (e.g. product name). |
requireEmail | boolean | false | Require an email field. |
placeholder | string | "Have a question?…" | Placeholder for the question textarea. |
Events
| Event | Payload | Description |
|---|---|---|
submit | { question, email?, context? } | Fired on submit. Independent of the endpoint POST. |
AI Context
component: XAFAskQuestion
package: "@xenterprises/nuxt-x-affiliate"
use-when: Reader-submitted question form for a product or article. POSTs to endpoint and emits submit event.
