Skip to content

Button

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?

optional children: 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?

optional color: BaseColor | ContentColor

Defined in: packages/solid/src/components/control/button/button.types.ts:24

The color of the button.

Default
'primary';
disabled?

optional disabled: boolean

Defined in: packages/solid/src/components/control/button/button.types.ts:43

Whether the button is disabled.

Default
false;
icon?

optional icon: 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?

optional loader: 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?

optional loading: 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()?

optional onClick: (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?

optional rounded: 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?

optional size: ControlSize

Defined in: packages/solid/src/components/control/button/button.types.ts:14

The size of the button.

Default
undefined;
title?

optional title: string

Defined in: packages/solid/src/components/control/button/button.types.ts:33

The title of the button.

variant?

optional variant: "contained" | "outlined" | "colored"

Defined in: packages/solid/src/components/control/button/button.types.ts:19

The variant of the button.

Default
'contained';

Variables

Button

const Button: Component<ButtonProps>

Defined in: packages/solid/src/components/control/button/button.component.tsx:11

A flexible button component.

Param

ButtonProps

Returns

The button component.