ButtonOptions
Defined in: components/button.ts:5
Options for button.
Properties
Section titled “Properties”content?
Section titled “content?”
optionalcontent?:Slot
Defined in: components/button.ts:7
Button content: a string for plain text, or a function for custom markup.
optionalicon?:Slot
Defined in: components/button.ts:9
Leading icon/adornment, drawn before the label.
click?
Section titled “click?”
optionalclick?: (event) =>void
Defined in: components/button.ts:11
Click handler.
Parameters
Section titled “Parameters”Event
Returns
Section titled “Returns”void
disabled?
Section titled “disabled?”
optionaldisabled?:boolean
Defined in: components/button.ts:13
Disables the button.
optionaltype?:"button"|"submit"|"reset"
Defined in: components/button.ts:15
Native button behaviour. Defaults to "button".
optionalhref?:string
Defined in: components/button.ts:17
Render as a link (<a role=button>) pointing here instead of a <button>.
ariaLabel?
Section titled “ariaLabel?”
optionalariaLabel?:string
Defined in: components/button.ts:19
Accessible label, when the button has only an icon.
attrs?
Section titled “attrs?”
optionalattrs?:string
Defined in: components/button.ts:30
Aberdeen attr/style string applied to the button. A button is a surface, so
pass surface modifier classes here to restyle it, e.g. ".danger",
".danger .outlined", or ".neutral" for a neutral button. Defaults to a
filled .primary surface.
Size is set here too, with .small or .large (medium is the default and
needs no class), e.g. ".danger .small". A .small/.large parent (such
as a buttonGroup) also sizes its buttons, so you can set it once.