Use a slot when a package needs named callable code. App code calls the public action and stays out of how that target is built, stored, mounted, or replaced.
product.search, a package-owned target for a search box. The app sends a query. Runtime Kit sends bytes to the target. The target returns reply bytes. The app decodes those bytes according to the public reply shape.When to use this
Use a slot when the user action needs work, not just data display.A slot is package-owned callable code. The package file says the target name and the methods it accepts. The implementation stays inside the package.
What you will build
Folder shape
product.search.Boundary file
App call
What should happen
What stays stable
Your app keeps callingproduct.search. The package can change the bytes behind that target without making the React component import implementation code, read a package file, or understand how the slot runs.Verify the recipe
Use this checklist before wiring the target into a real screen:Common failures
Extend it
After this works, you can add:- A React search surface that calls
product.searchfrom a button or form. - A
stored_bytesfile with package-owned search data. - A record that gives the surface initial search copy.
- A second method when the same target needs another public operation.
The public target name and call shape are safe to document. The private implementation, storage layout, and runtime setup stay out of public docs.
Next
Read Send a request for payload conversion, reply bytes, cancellation, and request errors.Read Runtime Kit API for the public function contract.Read Package file for exactslot field rules, method-list rules, artifact path rules, and invalid examples.