A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
name: homarr-custom-widget description: Author, validate, preview, test, install, or configure API-backed Homarr Custom JSX v2 widgets.
Homarr Custom Widget
Author requested widgets with release context; validate, test, persist, and return artifacts.
- Read primary API docs when missing/changed. Samples and successful previews are binding; load only needed schema, runtime, security, or component context.
- Batch unknown component searches/details.
contextAlreadyLoadedreuses context;phaseCompleteadvances. Stop only for genuine provider/model, lifecycle-service, or workbench-closure failure. - Community widgets use
customWidget_workshopSearch,customWidget_workshopGet, andcustomWidget_workshopInstall; configure and persist.
Return one fenced json block with the complete definition; keep evidence prose outside it. The definition has keyed
sources, requests, template, and optional options; actions are requests with kind: "action".
sources.defaultis required. HTTP hasbaseUrland credential-freeauth. Saved sources usetype: "integration"/integrationKind; Homarr holds credentials.- Saved integrations: discover kinds/full-access entries with
integration_getKinds/integration_all, bindintegrationIdbefore preview, omit URL/auth, and keep non-GET requests as actions. - Paths are slash-prefixed: strings use
{option:name}/{param:name}; query/body uses{"$option":"name"}/{"$param":"name"}. Loads usetrigger: "load"; manual helpers usetrigger: "manual". - Actions stay manual; preserve
confirmation,permission, andinvalidates; DELETE requires full permission/confirmation.$paramis manual-only;$optionmay drive loads. - Load data.requestId/status.requestId with RefreshButton; status.requestId?.ok === false is error. Manual SubFetch never populates data/status; its child receives (result, metadata) and renders its fields.
- Options have
label,control,default; installation config isoptions.name, neverinputs. Request-bound TextInput, Select, NumberInput, Pagination use literalbind+ default and manualSubFetch paramsmapinputs.<name>to$param. Dependent pagination usesdefaultValue={1}/resetKey={inputs.query}. Remove controls without an option/request/helper; guard arrays/nested with??; preserve documented timezone values; use UTC only when the contract says UTC. - Templates are one expression: no imports, hooks, refs, raw HTML/events, browser requests, eval, recursion, IIFEs,
statement blocks, or arbitrary functions. Use registered component names;
Iconmay aliasTablerIcon. Keep hierarchy, theme tokens, useful states, and narrow/wide layouts purposeful.
Bounded lifecycle
- Build a credential-free definition from request, verified context, and sample. Preserve a migration's API path, method, body, options, and behavior; omit unknown requests rather than guessing.
- Send the coherent complete definition directly to
customWidget_previewCreate; it validates both manifest and JSX. UsecustomWidget_validateTemplateonly for isolated JSX diagnostics, never as a preview prerequisite. UsecustomWidget_previewReviseTemplatefor JSX-only corrections after a preview exists. In the Assistant wrapper, multiline JSX usestemplateLinesand preview creation receives the complete definition. - Test every returned query/simulated action once, batching independent queries. On a concrete schema/preview error, fix only
that field and retry
customWidget_previewCreatewith the corrected definition; usecustomWidget_previewReviseTemplateonly for JSX errors after a preview exists. Stop only for genuine provider/model, lifecycle-service, or workbench-closure failure. - If
previewCreateuseddefinitionId, persist withcustomWidget_updateFromPreview; otherwise usecustomWidget_createFromPreview. Follow createnextActiononce. Configure credentials in Homarr; never repeat plaintext secrets.
Delivery
Report actual lifecycle results. If unavailable, add one post-artifact Unverified: line naming missing validation, preview,
renderer, or persistence. Never claim rendering/persistence from schema checks.