Reference headless
button
interface 2 type 1 function 1
# ButtonController
Members
disabledreadonly disabled: booleanidreadonly id: stringloadingreadonly loading: booleanrootreadonly root: AttachmentSvelte 5
{@attach}-compatible attachment for the host element.setDisabled()setDisabled(disabled): void###### Parameters
###### disabled
boolean###### Returns
voidsetLoading()setLoading(loading): void###### Parameters
###### loading
boolean###### Returns
voidsubscribe()subscribe(listener): () => voidSubscribe to (loading | disabled) state changes.
###### Parameters
###### listener
(
snapshot) =>void###### Returns
() =>
void
# CreateButtonOptions
Members
disabled?optional disabled?: booleanid?optional id?: stringloading?optional loading?: boolean
# Attachment
Attachment = (node) => void | (() => void)Parameters
nodeHTMLElement
Returns
void | (() => void)# createButton ( )
createButton(options?): ButtonControllerCreate a Button controller plus its {@attach}-compatible root.
Parameters
options?CreateButtonOptions = {}
Returns
ButtonController