Button
Click me!
Interfaces
ButtonProps
Defined in: packages/solid/src/components/control/button/button.types.ts:8
The Button component properties.
Extends
unknown<JSX.ButtonHTMLAttributes<HTMLInputElement>>.ParentProps
Properties
children?
optionalchildren:Element
Defined in: node_modules/.pnpm/solid-js@1.9.10/node_modules/solid-js/types/render/component.d.ts:28
Inherited from
ParentProps.children
color?
optionalcolor:BaseColor|ContentColor
Defined in: packages/solid/src/components/control/button/button.types.ts:24
The color of the button.
Default
'primary';disabled?
optionaldisabled:boolean
Defined in: packages/solid/src/components/control/button/button.types.ts:43
Whether the button is disabled.
Default
false;icon?
optionalicon:string|Element
Defined in: packages/solid/src/components/control/button/button.types.ts:29
The icon that should be rendered to the left of the button’s content. Supports both an icon name and JSX.Element.
loader?
optionalloader:Element
Defined in: packages/solid/src/components/control/button/button.types.ts:53
An alternative loader to be displayed instead of the default loading indicator.
Default
undefined;loading?
optionalloading:boolean
Defined in: packages/solid/src/components/control/button/button.types.ts:48
Whether the button is loading. This will display a loading indicator and disable the button.
Default
false;onClick()?
optionalonClick: (event) =>void
Defined in: packages/solid/src/components/control/button/button.types.ts:58
A callback that will be called when the button is clicked.
Parameters
event
MouseEvent
The click event.
Returns
void
rounded?
optionalrounded:boolean
Defined in: packages/solid/src/components/control/button/button.types.ts:38
If enabled, the icon will be rounded and no content besides the icon will be displayed.
Default
false;size?
optionalsize:ControlSize
Defined in: packages/solid/src/components/control/button/button.types.ts:14
The size of the button.
Default
undefined;title?
optionaltitle:string
Defined in: packages/solid/src/components/control/button/button.types.ts:33
The title of the button.
variant?
optionalvariant:"contained"|"outlined"|"colored"
Defined in: packages/solid/src/components/control/button/button.types.ts:19
The variant of the button.
Default
'contained';Variables
Button
constButton:Component<ButtonProps>
Defined in: packages/solid/src/components/control/button/button.component.tsx:11
A flexible button component.
Param
Returns
The button component.