Import
import { SpinButton } from "@typed/ui";Access SpinButton.SpinButton through the imported SpinButton export. Its declaration below describes the member.
This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.
Signatures
export declare function SpinButton<const Options extends SpinButtonOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, SpinButtonInternalProps<Options>>, "", Host>): import("./Dom/Types.js").HostComponent<Options | Host>;Examples
import { RefSubject } from "@typed/fx";
import { html } from "@typed/template";
import { component } from "@typed/template";
import * as SpinButton from "@typed/ui/SpinButton";
export const CopyCount = component(function* () {
const state = yield* SpinButton.makeState({ value: 1 });
const summary = RefSubject.map(state, ({ value }) => `Copies requested: ${value}`);
return html`<div class="copy-count">
<label for="print-copies">Number of copies</label>
${SpinButton.SpinButton({
state, min: 1, max: 100, step: 1,
props: { id: "print-copies", name: "copies", required: true },
})}
<p>${summary}</p>
</div>`;
});Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.