The Shiny input ID (input$<id>).
Initial value for the input, captured on first mount.
Optional configuration object.
OptionaldebounceMs?: numberDebounce delay in milliseconds for input updates (default: 100).
Optionalnamespace?: string | nullModule namespace to apply (or null to suppress
the surrounding ShinyModuleProvider namespace).
Optionalpriority?: EventPriorityPriority level for the input event.
Optionaltype?: stringOptional input-handler name appended as ${id}:${type}
when sending to Shiny. Use to route values through a Shiny input handler
such as "shiny.datetime". Must be non-empty and contain no whitespace or
:. The first mount of a given id finalizes the policy (an explicit type
or the absence of one); a later mount that omits type is a no-op, but a
later mount that supplies a type disagreeing with the finalized policy
throws — the handler name is a server-side semantic and must be consistent
across every useShinyInput / useSetShinyInput call for the same id.
A function that writes the input value.
A write-only React hook that returns just the setter for a Shiny input.
Use this when a component only needs to write an input value — typically a button, action handler, or anything that pushes events into the reactive graph but never reads the current value back. Mirrors Jotai's
useSetAtompattern: explicit at the call site that this is a producer, not a reader, and avoids the spurious re-renders thatuseShinyInputwould incur from subscribing to its own value updates.Same
defaultValueand options semantics asuseShinyInput— this hook registers the input on mount, so itsdefaultValueseeds the registry the same way.