function / @typed/ui/Disclosure

Button

Renders a native <summary> disclosure trigger.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Summary activation
Since
1.0.0

Import

import { Button } from "@typed/ui/Disclosure";

Signatures

export declare function Button<const Options extends ButtonOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, ButtonInternalProps>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;

Why

The browser owns activation and toggling; Typed does not emulate them with click handlers or synthetic events.

Ownership and lifetime

Running the Fx owns dynamic content in its Scope. A custom host must remain a valid summary participant inside the associated details element.

Examples

import { Button } from "@typed/ui/Disclosure"

const summary = Button({ content: "Advanced settings" })

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source