Skip to main content

Type Alias: GtkButtonProps

GtkButtonProps = WidgetProps & object

Defined in: generated/jsx.ts:2046

Props for the GtkButton widget.

Type Declaration

NameTypeDescriptionDefined in
actionName?stringThe name of the action with which this widget should be associated.generated/jsx.ts:2071
actionTarget?GLib.VariantThe target value of the actionable widget's action.generated/jsx.ts:2073
canShrink?booleanWhether the size of the button can be made smaller than the natural size of its contents. For text buttons, setting this property will allow ellipsizing the label. If the contents of a button are an icon or a custom widget, setting this property has no effect.generated/jsx.ts:2056
child?Gtk.Widget | nullThe child widget.generated/jsx.ts:2058
children?ReactNode-generated/jsx.ts:2086
hasFrame?booleanWhether the button has a frame.generated/jsx.ts:2060
iconName?string | nullThe name of the icon used to automatically populate the button.generated/jsx.ts:2062
label?string | nullText of the label inside the button, if the button contains a label widget.generated/jsx.ts:2064
onActivate()?(self) => void | nullEmitted to animate press then release. This is an action signal. Applications should never connect to this signal, but use the Button.:clicked signal. The default bindings for this signal are all forms of the and Enter keys.generated/jsx.ts:2083
onClicked()?(self) => void | nullEmitted when the button has been activated (pressed and released).generated/jsx.ts:2085
onNotify?(self, propName) => void | nullCalled when any property on this widget changes. Param The widget that emitted the notification Param The name of the property that changed (in kebab-case)generated/jsx.ts:2092
ref?Ref<Gtk.Button>-generated/jsx.ts:2106
useUnderline?booleanIf set, an underline in the text indicates that the following character is to be used as mnemonic.generated/jsx.ts:2069