Skip to main content

Type Alias: GtkButtonProps

GtkButtonProps = WidgetProps & object

Defined in: generated/jsx.ts:1734

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:1759
actionTarget?GLib.VariantThe target value of the actionable widget's action.generated/jsx.ts:1761
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:1744
child?Gtk.Widget | nullThe child widget.generated/jsx.ts:1746
children?ReactNode-generated/jsx.ts:1774
hasFrame?booleanWhether the button has a frame.generated/jsx.ts:1748
iconName?string | nullThe name of the icon used to automatically populate the button.generated/jsx.ts:1750
label?string | nullText of the label inside the button, if the button contains a label widget.generated/jsx.ts:1752
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:1771
onClicked?(self) => void | nullEmitted when the button has been activated (pressed and released).generated/jsx.ts:1773
ref?Ref<Gtk.Button>-generated/jsx.ts:1775
useUnderline?booleanIf set, an underline in the text indicates that the following character is to be used as mnemonic.generated/jsx.ts:1757