Skip to content

@jimka/typescript-ui / component/button / TabCloseButton

Class: TabCloseButton

Defined in: src/typescript/lib/component/button/TabCloseButton.ts:36

A compact close button displaying the times glyph, sized to sit flush inside a tab header.

Extends

Constructors

new TabCloseButton()

ts
new TabCloseButton(options?: TabCloseButtonOptions): TabCloseButton

Defined in: src/typescript/lib/component/button/TabCloseButton.ts:41

Creates a TabCloseButton seeded with the times glyph and sized for use in a tab toolbar.

Parameters

options?

TabCloseButtonOptions

Returns

TabCloseButton

Overrides

Button.constructor

Methods

addActionListener()

ts
addActionListener(listener: Function): this

Defined in: src/typescript/lib/component/button/Button.ts:304

Registers a click event listener on this button.

Parameters

listener

Function

The callback to invoke when the button is clicked.

Returns

this

This component, for method chaining.

Inherited from

Button.addActionListener


addComponent()

ts
addComponent(component: Component, constraints?: LayoutConstraints): this

Defined in: src/typescript/lib/core/Component.ts:2774

Adds a child component, appends its element, wires preferred-size change propagation, and triggers layout.

Parameters

component

Component

The child component to add.

constraints?

LayoutConstraints

Optional. Layout constraints to pass to the layout manager.

Returns

this

Inherited from

Button.addComponent


addComponents()

ts
addComponents(...specs: (
  | Component<ComponentOptions>
  | ConstrainedComponent
  | (
  | Component<ComponentOptions>
  | ConstrainedComponent)[])[]): this

Defined in: src/typescript/lib/core/Component.ts:2752

Adds multiple child components in a single call, with optional per-component layout constraints.

Each argument is either a Component (added with no constraints), a ConstrainedComponent pair (added with the supplied constraints), or an array of either form (each entry is processed in order). All three forms can be freely mixed in the same call.

Parameters

specs

...( | Component<ComponentOptions> | ConstrainedComponent | ( | Component<ComponentOptions> | ConstrainedComponent)[])[]

The components to add. Each entry is a bare Component, a ConstrainedComponent pair, or an array of either.

Returns

this

This component, for method chaining.

Inherited from

Button.addComponents


applyStyle()

ts
applyStyle(element: HTMLElement): this

Defined in: src/typescript/lib/core/Component.ts:2580

Writes all current style properties to the given element and its associated CSS rule.

Parameters

element

HTMLElement

The HTMLElement to apply styles to.

Returns

this

This component, for method chaining.

Remarks

Clears all existing inline styles on the element before re-applying, ensuring a clean state.

Inherited from

Button.applyStyle


clearAnimation()

ts
clearAnimation(): this

Defined in: src/typescript/lib/core/Component.ts:2268

Removes the CSS animation property from the component's CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearAnimation


clearAppearance()

ts
clearAppearance(): this

Defined in: src/typescript/lib/core/Component.ts:1314

Removes both the -webkit-appearance and appearance CSS properties.

Returns

this

This component, for method chaining.

Inherited from

Button.clearAppearance


clearBackgroundColor()

ts
clearBackgroundColor(): this

Defined in: src/typescript/lib/core/Component.ts:950

Removes the background-color CSS property so the element inherits from its parent.

Returns

this

This component, for method chaining.

Inherited from

Button.clearBackgroundColor


clearBackgroundImage()

ts
clearBackgroundImage(): this

Defined in: src/typescript/lib/core/Component.ts:989

Removes the background-image CSS property from the component's CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearBackgroundImage


clearBorder()

ts
clearBorder(): this

Defined in: src/typescript/lib/core/Component.ts:1086

Clears the component's border by applying an explicit 0-width, none-style, black-colour border on every side. The longhand writes guarantee the cleared state overrides any inherited or class-level border styling.

Returns

this

This component, for method chaining.

Inherited from

Button.clearBorder


clearBorderImage()

ts
clearBorderImage(): this

Defined in: src/typescript/lib/core/Component.ts:1354

Removes the border-image CSS property from the element.

Returns

this

This component, for method chaining.

Inherited from

Button.clearBorderImage


clearBorderRadius()

ts
clearBorderRadius(): this

Defined in: src/typescript/lib/core/Component.ts:1198

Removes the border-radius CSS property from the element.

Returns

this

This component, for method chaining.

Inherited from

Button.clearBorderRadius


clearColorScheme()

ts
clearColorScheme(): this

Defined in: src/typescript/lib/core/Component.ts:1059

Removes the color-scheme CSS property from the element.

Returns

this

This component, for method chaining.

Inherited from

Button.clearColorScheme


clearContain()

ts
clearContain(): this

Defined in: src/typescript/lib/core/Component.ts:2225

Removes the contain CSS property from the component's CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearContain


clearCursor()

ts
clearCursor(): this

Defined in: src/typescript/lib/core/Component.ts:1156

Removes the inline cursor style from the element.

Returns

this

This component, for method chaining.

Inherited from

Button.clearCursor


clearForegroundColor()

ts
clearForegroundColor(): this

Defined in: src/typescript/lib/core/Component.ts:1028

Removes the color (foreground) CSS property so the element inherits from its parent.

Returns

this

This component, for method chaining.

Inherited from

Button.clearForegroundColor


clearGlyph()

ts
clearGlyph(): this

Defined in: src/typescript/lib/component/button/Button.ts:270

Removes the leading glyph from the button, if one is present.

Returns

this

This component, for method chaining.

Inherited from

Button.clearGlyph


clearHoverBackgroundColor()

ts
clearHoverBackgroundColor(): this

Defined in: src/typescript/lib/component/button/Button.ts:536

Removes the background-color from the :hover:not(:active) CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearHoverBackgroundColor


clearHoverBackgroundImage()

ts
clearHoverBackgroundImage(): this

Defined in: src/typescript/lib/component/button/Button.ts:571

Removes the background-image from the :hover:not(:active) CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearHoverBackgroundImage


clearHoverBorderRadius()

ts
clearHoverBorderRadius(): this

Defined in: src/typescript/lib/component/button/Button.ts:664

Removes the border-radius from the :hover:not(:active) CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearHoverBorderRadius


clearHoverForegroundColor()

ts
clearHoverForegroundColor(): this

Defined in: src/typescript/lib/component/button/Button.ts:606

Removes the color (foreground) from the :hover:not(:active) CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearHoverForegroundColor


clearHoverShadow()

ts
clearHoverShadow(): this

Defined in: src/typescript/lib/component/button/Button.ts:699

Removes the box-shadow from the :hover:not(:active) CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearHoverShadow


clearInsets()

ts
clearInsets(): this

Defined in: src/typescript/lib/core/Component.ts:862

Resets the component's insets to zero on all sides.

Returns

this

This component, for method chaining.

Remarks

Companion to setInsets. Resets to new Insets(0, 0, 0, 0) — semantically a "reset to default" rather than a CSS-level clear.

Inherited from

Button.clearInsets


clearOpacity()

ts
clearOpacity(): this

Defined in: src/typescript/lib/core/Component.ts:2407

Removes the opacity property from the element's inline style, restoring full opacity from the CSS rule or default.

Returns

this

This component, for method chaining.

Inherited from

Button.clearOpacity


clearOutline()

ts
clearOutline(): this

Defined in: src/typescript/lib/core/Component.ts:1274

Removes the outline CSS property from the element.

Returns

this

This component, for method chaining.

Inherited from

Button.clearOutline


clearOverflow()

ts
clearOverflow(): this

Defined in: src/typescript/lib/core/Component.ts:2095

Removes the overflow CSS property from the component's CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearOverflow


clearOverflowX()

ts
clearOverflowX(): this

Defined in: src/typescript/lib/core/Component.ts:2138

Removes the overflow-x CSS property from the component's CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearOverflowX


clearOverflowY()

ts
clearOverflowY(): this

Defined in: src/typescript/lib/core/Component.ts:2181

Removes the overflow-y CSS property from the component's CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearOverflowY


clearPadding()

ts
clearPadding(): this

Defined in: src/typescript/lib/core/Component.ts:911

Resets the CSS padding to zero on all sides.

Returns

this

This component, for method chaining.

Remarks

Companion to setPadding. Writes "0px 0px 0px 0px" rather than removing the property — preserves the legacy setPadding(null) behaviour as a reset, not a CSS-level clear.

Inherited from

Button.clearPadding


clearPointerEvents()

ts
clearPointerEvents(): this

Defined in: src/typescript/lib/core/Component.ts:2365

Removes the inline pointer-events property from the element.

Returns

this

This component, for method chaining.

Inherited from

Button.clearPointerEvents


clearPosition()

ts
clearPosition(): this

Defined in: src/typescript/lib/core/Component.ts:2055

Removes the explicit position override from the component's CSS rule. The framework default (Position.ABSOLUTE) reported by getPosition remains in effect.

Returns

this

This component, for method chaining.

Inherited from

Button.clearPosition


clearPressedBackgroundColor()

ts
clearPressedBackgroundColor(): this

Defined in: src/typescript/lib/component/button/Button.ts:338

Removes the background-color from the :active CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearPressedBackgroundColor


clearPressedBackgroundImage()

ts
clearPressedBackgroundImage(): this

Defined in: src/typescript/lib/component/button/Button.ts:373

Removes the background-image from the :active CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearPressedBackgroundImage


clearPressedBorderRadius()

ts
clearPressedBorderRadius(): this

Defined in: src/typescript/lib/component/button/Button.ts:466

Removes the border-radius from the :active CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearPressedBorderRadius


clearPressedForegroundColor()

ts
clearPressedForegroundColor(): this

Defined in: src/typescript/lib/component/button/Button.ts:408

Removes the color (foreground) from the :active CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearPressedForegroundColor


clearPressedShadow()

ts
clearPressedShadow(): this

Defined in: src/typescript/lib/component/button/Button.ts:501

Removes the box-shadow from the :active CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearPressedShadow


clearShadow()

ts
clearShadow(): this

Defined in: src/typescript/lib/core/Component.ts:1237

Removes the box-shadow by writing "none" (preserving the legacy setShadow(null) semantic — not a removeProperty).

Returns

this

This component, for method chaining.

Inherited from

Button.clearShadow


clearTransform()

ts
clearTransform(): this

Defined in: src/typescript/lib/core/Component.ts:1397

Removes the transform CSS property from the element.

Returns

this

This component, for method chaining.

Inherited from

Button.clearTransform


clearUserSelect()

ts
clearUserSelect(): this

Defined in: src/typescript/lib/core/Component.ts:2526

Removes the user-select CSS property from the component's CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearUserSelect


clearVerticalAlign()

ts
clearVerticalAlign(): this

Defined in: src/typescript/lib/core/Component.ts:1738

Removes the vertical-align CSS property from the element.

Returns

this

This component, for method chaining.

Inherited from

Button.clearVerticalAlign


clearWhiteSpace()

ts
clearWhiteSpace(): this

Defined in: src/typescript/lib/core/Component.ts:2485

Removes the white-space CSS property from the component's CSS rule.

Returns

this

This component, for method chaining.

Inherited from

Button.clearWhiteSpace


delAttribute()

ts
delAttribute(key: string): this

Defined in: src/typescript/lib/core/Component.ts:726

Removes a component-level attribute from both the internal map and the DOM element.

Parameters

key

string

The attribute name to remove.

Returns

this

Inherited from

Button.delAttribute


delLayoutConstraints()

ts
delLayoutConstraints(component: Component): 
  | undefined
  | null
  | LayoutConstraints

Defined in: src/typescript/lib/core/Component.ts:2967

Removes and returns the layout constraints for a child component.

Parameters

component

Component

The child component whose constraints to remove.

Returns

| undefined | null | LayoutConstraints

The removed LayoutConstraints, or null if no layout manager is set.

Inherited from

Button.delLayoutConstraints


doChildrenComponentLayouts()

ts
doChildrenComponentLayouts(): this

Defined in: src/typescript/lib/core/Component.ts:3042

Calls doLayout on each direct child component.

Returns

this

This component, for method chaining.

Inherited from

Button.doChildrenComponentLayouts


doLayout()

ts
doLayout(): this

Defined in: src/typescript/lib/core/Component.ts:3060

Delegates layout to the layout manager unless layout is currently paused.

Returns

this

This component, for method chaining.

Remarks

Throws an Error if no layout manager has been set.

Inherited from

Button.doLayout


flushLayout()

ts
flushLayout(): this

Defined in: src/typescript/lib/core/Component.ts:3107

Forces a synchronous layout pass on this component, removing it from the scheduled-layout queue if it was pending. Use when a layout-derived value must be read before the next animation frame.

Returns

this

This component, for method chaining.

Inherited from

Button.flushLayout


focus()

ts
focus(): this

Defined in: src/typescript/lib/core/Component.ts:2542

Moves browser focus to this component's DOM element.

Returns

this

This component, for method chaining.

Inherited from

Button.focus


getAnimation()

ts
getAnimation(): null | string

Defined in: src/typescript/lib/core/Component.ts:2241

Returns the CSS animation shorthand value, or null if not set.

Returns

null | string

The CSS animation string, or null.

Inherited from

Button.getAnimation


getAppearance()

ts
getAppearance(): null | string

Defined in: src/typescript/lib/core/Component.ts:1287

Returns the CSS appearance value last passed to setAppearance, or null if no appearance override is set.

Returns

null | string

The appearance string, or null.

Inherited from

Button.getAppearance


getAria()

ts
getAria(): Aria

Defined in: src/typescript/lib/core/Component.ts:797

Returns the Aria helper for this component, creating it lazily on first access.

Returns

Aria

The ARIA helper instance.

Inherited from

Button.getAria


getAttribute()

ts
getAttribute(key: string): undefined | String

Defined in: src/typescript/lib/core/Component.ts:698

Returns a component-level attribute value from the internal attributes map.

Parameters

key

string

The attribute name.

Returns

undefined | String

The stored attribute value, or undefined if not set.

Inherited from

Button.getAttribute


getAutoCommitStyle()

ts
getAutoCommitStyle(): boolean

Defined in: src/typescript/lib/core/Component.ts:579

Returns whether style changes are immediately committed to the DOM.

Returns

boolean

True if auto-commit is enabled, false if changes are batched.

Inherited from

Button.getAutoCommitStyle


getBackgroundColor()

ts
getBackgroundColor(): null | string

Defined in: src/typescript/lib/core/Component.ts:923

Returns the component's background color, or null if inherited.

Returns

null | string

The CSS color string, or null if none is set.

Inherited from

Button.getBackgroundColor


getBackgroundImage()

ts
getBackgroundImage(): null | string

Defined in: src/typescript/lib/core/Component.ts:966

Returns the background image CSS value, or null if none is set.

Returns

null | string

The CSS background-image string, or null.

Inherited from

Button.getBackgroundImage


getBaseline()

ts
getBaseline(): null | number

Defined in: src/typescript/lib/component/button/Button.ts:293

Returns the offset from the top of the button to the label's text baseline.

Returns

null | number

The baseline offset in pixels, or null when the label has no baseline.

Inherited from

Button.getBaseline


getBorder()

ts
getBorder(): null | Border

Defined in: src/typescript/lib/core/Component.ts:1075

Returns the Border instance, or null if no border is set.

Returns

null | Border

The current Border object, or null.

Inherited from

Button.getBorder


getBorderImage()

ts
getBorderImage(): null | string

Defined in: src/typescript/lib/core/Component.ts:1330

Returns the CSS border-image value last passed to setBorderImage, or null if no border-image is set.

Returns

null | string

The border-image string, or null.

Inherited from

Button.getBorderImage


getBorderRadius()

ts
getBorderRadius(): null | string

Defined in: src/typescript/lib/core/Component.ts:1172

Returns the CSS border-radius value, or null if not set.

Returns

null | string

The CSS border-radius string, or null.

Inherited from

Button.getBorderRadius


getBorderSize()

ts
getBorderSize(): PerimeterSize

Defined in: src/typescript/lib/core/Component.ts:1621

Returns the per-side pixel widths of the component's border.

Returns

PerimeterSize

A PerimeterSize with zero values on each side when no border is set.

Inherited from

Button.getBorderSize


getClassName()

ts
getClassName(): string

Defined in: src/typescript/lib/core/BaseObject.ts:44

Returns the runtime class name of this object.

Returns

string

The name of the constructor function as a string.

Inherited from

Button.getClassName


getColorScheme()

ts
getColorScheme(): null | string

Defined in: src/typescript/lib/core/Component.ts:1039

Returns

null | string

Inherited from

Button.getColorScheme


getComponents()

ts
getComponents(): Component<ComponentOptions>[]

Defined in: src/typescript/lib/core/Component.ts:2923

Returns the array of child components.

Returns

Component<ComponentOptions>[]

The live array of child Component instances.

Inherited from

Button.getComponents


getContain()

ts
getContain(): null | string

Defined in: src/typescript/lib/core/Component.ts:2197

Returns the CSS contain value, or null if not set.

Returns

null | string

The CSS contain string, or null.

Inherited from

Button.getContain


getCursor()

ts
getCursor(): null | string

Defined in: src/typescript/lib/core/Component.ts:1130

Returns the current CSS cursor value.

Returns

null | string

The CSS cursor string, or null if not set.

Inherited from

Button.getCursor


getDisabledAttribute()

ts
getDisabledAttribute(): boolean

Defined in: src/typescript/lib/core/Component.ts:2284

Returns the cached state of the HTML disabled attribute on the element.

Returns

boolean

True when the disabled attribute is set, false otherwise.

Inherited from

Button.getDisabledAttribute


getDisplay()

ts
getDisplay(): string

Defined in: src/typescript/lib/core/Component.ts:2022

Returns the CSS display mode for this component.

Returns

string

The current display value (e.g. "block", "grid", "flex").

Inherited from

Button.getDisplay


getElement()

ts
getElement(createIfMissing: boolean): HTMLElement

Defined in: src/typescript/lib/core/Component.ts:433

Returns the DOM element, querying by ID; creates and renders it if createIfMissing is true.

Parameters

createIfMissing

boolean = false

Optional. When true, renders and returns a new element if none exists in the DOM.

Returns

HTMLElement

The component's HTMLElement, or undefined if it does not exist and createIfMissing is false.

Inherited from

Button.getElement


getElementAttribute()

ts
getElementAttribute(key: string): undefined | null | string

Defined in: src/typescript/lib/core/Component.ts:484

Returns the value of a DOM element attribute, or undefined if the element is not in the DOM.

Parameters

key

string

The attribute name to retrieve.

Returns

undefined | null | string

The attribute value string, null if the attribute is absent, or undefined if the element is not in the DOM.

Inherited from

Button.getElementAttribute


getForegroundColor()

ts
getForegroundColor(): null | string

Defined in: src/typescript/lib/core/Component.ts:1001

Returns the foreground (text) color, or null if inherited.

Returns

null | string

The CSS color string, or null if none is set.

Inherited from

Button.getForegroundColor


getGlyph()

ts
getGlyph(): null | Glyph

Defined in: src/typescript/lib/component/button/Button.ts:284

Returns the current leading glyph component, or null if none is set.

Returns

null | Glyph

The Glyph instance, or null.

Inherited from

Button.getGlyph


getHeight()

ts
getHeight(): number

Defined in: src/typescript/lib/core/Component.ts:1844

Returns the component's current height in pixels.

Returns

number

The height in pixels, or 0 if the size is unavailable.

Inherited from

Button.getHeight


getHoverBackgroundColor()

ts
getHoverBackgroundColor(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:513

Returns the background color applied when the pointer is over the button (but not pressed).

Returns

null | string

The CSS color string, or null if not set.

Inherited from

Button.getHoverBackgroundColor


getHoverBackgroundImage()

ts
getHoverBackgroundImage(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:548

Returns the background image applied when the pointer is over the button (but not pressed).

Returns

null | string

The CSS background-image string, or null if not set.

Inherited from

Button.getHoverBackgroundImage


getHoverBorder()

ts
getHoverBorder(): null | Border

Defined in: src/typescript/lib/component/button/Button.ts:618

Returns the border applied when the pointer is over the button (but not pressed).

Returns

null | Border

The Border instance for the hover state, or null if not set.

Inherited from

Button.getHoverBorder


getHoverBorderRadius()

ts
getHoverBorderRadius(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:641

Returns the border radius applied when the pointer is over the button (but not pressed).

Returns

null | string

The CSS border-radius string, or null if not set.

Inherited from

Button.getHoverBorderRadius


getHoverForegroundColor()

ts
getHoverForegroundColor(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:583

Returns the text color applied when the pointer is over the button (but not pressed).

Returns

null | string

The CSS color string, or null if not set.

Inherited from

Button.getHoverForegroundColor


getHoverShadow()

ts
getHoverShadow(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:676

Returns the box shadow applied when the pointer is over the button (but not pressed).

Returns

null | string

The CSS box-shadow string, or null if not set.

Inherited from

Button.getHoverShadow


getId()

ts
getId(): string

Defined in: src/typescript/lib/core/BaseObject.ts:24

Returns the unique identifier for this object.

Returns

string

The UUID string assigned at construction time.

Inherited from

Button.getId


getInnerSize()

ts
getInnerSize(): 
  | null
  | {
  height: number;
  width: number;
}

Defined in: src/typescript/lib/core/Component.ts:1599

Returns the usable inner size: component size minus insets and border widths.

Returns

| null | { height: number; width: number; }

The inner Size in pixels, or null if the element is not yet in the DOM.

Inherited from

Button.getInnerSize


getInsets()

ts
getInsets(): Insets

Defined in: src/typescript/lib/core/Component.ts:835

Returns the component's insets (internal spacing used by layout managers).

Returns

Insets

The current Insets instance.

Inherited from

Button.getInsets


getLayoutConstraints()

ts
getLayoutConstraints(component: Component): 
  | undefined
  | LayoutConstraints

Defined in: src/typescript/lib/core/Component.ts:2934

Returns the layout constraints for a child component from the layout manager.

Parameters

component

Component

The child component whose constraints to retrieve.

Returns

| undefined | LayoutConstraints

The LayoutConstraints for the component, or undefined if none are set.

Inherited from

Button.getLayoutConstraints


getLayoutManager()

ts
getLayoutManager(): LayoutManager

Defined in: src/typescript/lib/core/Component.ts:2981

Returns the layout manager currently attached to this component.

Returns

LayoutManager

The current LayoutManager instance.

Inherited from

Button.getLayoutManager


getMaxSize()

ts
getMaxSize(): null | Size

Defined in: src/typescript/lib/core/Component.ts:1530

Returns the effective maximum size: the larger of the component and layout manager maximums.

Returns

null | Size

A Size object whose width and height are the element-wise maximums of the component and layout manager maximums.

Inherited from

Button.getMaxSize


getMinSize()

ts
getMinSize(): null | Size

Defined in: src/typescript/lib/core/Component.ts:1463

Returns the effective minimum size: the larger of the component and layout manager minimums.

Returns

null | Size

A Size object whose width and height are the element-wise maximums of the component and layout manager minimums.

Inherited from

Button.getMinSize


getOpacity()

ts
getOpacity(): null | number

Defined in: src/typescript/lib/core/Component.ts:2382

Returns the opacity value last passed to setOpacity, or null if no opacity has been set.

Returns

null | number

The opacity number, or null.

Inherited from

Button.getOpacity


getOutline()

ts
getOutline(): null | string

Defined in: src/typescript/lib/core/Component.ts:1250

Returns the CSS outline value last passed to setOutline, or null if no outline is set.

Returns

null | string

The outline string, or null.

Inherited from

Button.getOutline


getOverflow()

ts
getOverflow(): null | string

Defined in: src/typescript/lib/core/Component.ts:2071

Returns the CSS overflow value.

Returns

null | string

The CSS overflow string, or null if not set.

Inherited from

Button.getOverflow


getOverflowX()

ts
getOverflowX(): null | string

Defined in: src/typescript/lib/core/Component.ts:2111

Returns the CSS overflow-x value, or null if not set.

Returns

null | string

The CSS overflow-x string, or null.

Inherited from

Button.getOverflowX


getOverflowY()

ts
getOverflowY(): null | string

Defined in: src/typescript/lib/core/Component.ts:2154

Returns the CSS overflow-y value, or null if not set.

Returns

null | string

The CSS overflow-y string, or null.

Inherited from

Button.getOverflowY


getPadding()

ts
getPadding(): null | Insets

Defined in: src/typescript/lib/core/Component.ts:875

Returns the CSS padding insets for this component.

Returns

null | Insets

The current padding Insets, or null if none are set.

Inherited from

Button.getPadding


getParentComponent()

ts
getParentComponent(): 
  | null
| Component<ComponentOptions>

Defined in: src/typescript/lib/core/Component.ts:2735

Returns the parent component this component was added to, or null if it has no parent.

Returns

| null | Component<ComponentOptions>

The parent Component, or null.

Inherited from

Button.getParentComponent


getPerimiterSize()

ts
getPerimiterSize(): PerimeterSize

Defined in: src/typescript/lib/core/Component.ts:1644

Returns the total per-side consumed space: insets plus border widths.

Returns

PerimeterSize

A PerimeterSize where each side is the sum of the inset and border width for that side.

Inherited from

Button.getPerimiterSize


getPointerEvents()

ts
getPointerEvents(): null | string

Defined in: src/typescript/lib/core/Component.ts:2341

Returns the inline pointer-events value last passed to setPointerEvents, or null if not set.

Returns

null | string

The pointer-events string, or null.

Inherited from

Button.getPointerEvents


getPosition()

ts
getPosition(): Position

Defined in: src/typescript/lib/core/Component.ts:1993

Returns the CSS position mode for this component.

Returns

Position

The current Position value (e.g. Position.ABSOLUTE).

Inherited from

Button.getPosition


getPreferredSize()

ts
getPreferredSize(): null | Size

Defined in: src/typescript/lib/core/Component.ts:1421

Returns the preferred size from the explicit override, layout manager, or current size.

Returns

null | Size

The preferred Size, determined in priority order: explicit override, layout manager, then current size.

Inherited from

Button.getPreferredSize


getPressedBackgroundColor()

ts
getPressedBackgroundColor(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:315

Returns the background color applied when the button is in the :active state.

Returns

null | string

The CSS color string, or null if not set.

Inherited from

Button.getPressedBackgroundColor


getPressedBackgroundImage()

ts
getPressedBackgroundImage(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:350

Returns the background image applied when the button is in the :active state.

Returns

null | string

The CSS background-image string, or null if not set.

Inherited from

Button.getPressedBackgroundImage


getPressedBorder()

ts
getPressedBorder(): null | Border

Defined in: src/typescript/lib/component/button/Button.ts:420

Returns the border applied when the button is in the :active state.

Returns

null | Border

The Border instance for the :active state, or null if not set.

Inherited from

Button.getPressedBorder


getPressedBorderRadius()

ts
getPressedBorderRadius(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:443

Returns the border radius applied when the button is in the :active state.

Returns

null | string

The CSS border-radius string, or null if not set.

Inherited from

Button.getPressedBorderRadius


getPressedForegroundColor()

ts
getPressedForegroundColor(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:385

Returns the text color applied when the button is in the :active state.

Returns

null | string

The CSS color string, or null if not set.

Inherited from

Button.getPressedForegroundColor


getPressedShadow()

ts
getPressedShadow(): null | string

Defined in: src/typescript/lib/component/button/Button.ts:478

Returns the box shadow applied when the button is in the :active state.

Returns

null | string

The CSS box-shadow string, or null if not set.

Inherited from

Button.getPressedShadow


getShadow()

ts
getShadow(): null | string

Defined in: src/typescript/lib/core/Component.ts:1213

Returns the CSS box-shadow value, or null if not set.

Returns

null | string

The CSS box-shadow string, or null.

Inherited from

Button.getShadow


getSize()

ts
getSize(): null | Size

Defined in: src/typescript/lib/core/Component.ts:1409

Returns the component's current width and height.

Returns

null | Size

A Size object with the current width and height in pixels.

Inherited from

Button.getSize


getTag()

ts
getTag(): string

Defined in: src/typescript/lib/core/Component.ts:359

Returns the HTML tag name used when creating this component's element.

Returns

string

The HTML tag string (e.g. "div", "button").

Inherited from

Button.getTag


getText()

ts
getText(): Text

Defined in: src/typescript/lib/component/button/Button.ts:231

Returns the Text child component used to display the button text.

Returns

Text

The internal Text instance.

Inherited from

Button.getText


getTransform()

ts
getTransform(): null | string

Defined in: src/typescript/lib/core/Component.ts:1373

Returns the CSS transform value last passed to setTransform, or null if no transform is set.

Returns

null | string

The transform string, or null.

Remarks

Reflects the value written to the component's CSS rule by setTransform. setTranslate writes transform as an inline style on a separate surface — its value is not reflected here. The two transform surfaces (rule vs. inline) are independent; the cached value here is the rule-side value only.

Inherited from

Button.getTransform


getTranslateX()

ts
getTranslateX(): number

Defined in: src/typescript/lib/core/Component.ts:1948

Returns the cached translate-X component of the element's transform (pixels).

Returns

number

The translate-X value last passed to setTranslate, or 0.

Inherited from

Button.getTranslateX


getTranslateY()

ts
getTranslateY(): number

Defined in: src/typescript/lib/core/Component.ts:1957

Returns the cached translate-Y component of the element's transform (pixels).

Returns

number

The translate-Y value last passed to setTranslate, or 0.

Inherited from

Button.getTranslateY


getUserSelect()

ts
getUserSelect(): null | string

Defined in: src/typescript/lib/core/Component.ts:2502

Returns the user-select value last passed to setUserSelect, or null if no value has been set.

Returns

null | string

The user-select string, or null.

Inherited from

Button.getUserSelect


getVerticalAlign()

ts
getVerticalAlign(): null | string

Defined in: src/typescript/lib/core/Component.ts:1718

Returns

null | string

Inherited from

Button.getVerticalAlign


getWhiteSpace()

ts
getWhiteSpace(): null | string

Defined in: src/typescript/lib/core/Component.ts:2455

Returns the CSS white-space value last written by setWhiteSpace, or null if cleared.

Returns

null | string

The white-space string, or null.

Inherited from

Button.getWhiteSpace


getWidth()

ts
getWidth(): number

Defined in: src/typescript/lib/core/Component.ts:1806

Returns the component's current width in pixels.

Returns

number

The width in pixels, or 0 if the size is unavailable.

Inherited from

Button.getWidth


getWillChange()

ts
getWillChange(): null | string

Defined in: src/typescript/lib/core/Component.ts:2419

Returns the cached will-change value last passed to setWillChange.

Returns

null | string

The active hint string, or null if no hint is set.

Inherited from

Button.getWillChange


getX()

ts
getX(): number

Defined in: src/typescript/lib/core/Component.ts:1882

Returns the component's horizontal position (CSS left) in pixels.

Returns

number

The left offset in pixels.

Inherited from

Button.getX


getY()

ts
getY(): number

Defined in: src/typescript/lib/core/Component.ts:1915

Returns the component's vertical position (CSS top) in pixels.

Returns

number

The top offset in pixels.

Inherited from

Button.getY


hasElementAttribute()

ts
hasElementAttribute(key: string): undefined | boolean

Defined in: src/typescript/lib/core/Component.ts:467

Returns whether the DOM element has the given attribute set.

Parameters

key

string

The attribute name to check.

Returns

undefined | boolean

True if the attribute exists, false otherwise, or undefined if the element is not in the DOM.

Inherited from

Button.hasElementAttribute


insertComponent()

ts
insertComponent(
   component: Component, 
   index: number, 
   constraints?: LayoutConstraints): this

Defined in: src/typescript/lib/core/Component.ts:2819

Inserts a child component at the given index, appends its element at the matching DOM position, wires preferred-size change propagation, and triggers layout.

Parameters

component

Component

The child component to insert.

index

number

Zero-based insertion index. Values outside [0, children.length] are clamped.

constraints?

LayoutConstraints

Optional. Layout constraints to pass to the layout manager.

Returns

this

Remarks

Use this when child order matters — for example, placing a leading glyph before an existing label without removing and re-appending the label. addComponent(c, …) is the append-at-end shortcut for insertComponent(c, children.length, …).

Inherited from

Button.insertComponent


isEnabled()

ts
isEnabled(): boolean

Defined in: src/typescript/lib/component/button/Button.ts:743

Returns whether the button is currently enabled.

Returns

boolean

True if the button accepts user interaction.

Inherited from

Button.isEnabled


isLayoutPaused()

ts
isLayoutPaused(): boolean

Defined in: src/typescript/lib/core/Component.ts:3012

Returns true if layout has been paused for this component.

Returns

boolean

True if layout passes are currently suppressed.

Inherited from

Button.isLayoutPaused


isVisible()

ts
isVisible(): null | Boolean

Defined in: src/typescript/lib/core/Component.ts:738

Returns the visibility state, or null if inherited from the parent.

Returns

null | Boolean

True if explicitly visible, false if explicitly hidden, null if inheriting from the parent.

Inherited from

Button.isVisible


pauseLayout()

ts
pauseLayout(): this

Defined in: src/typescript/lib/core/Component.ts:3019

Suspends automatic layout passes until resumeLayout is called.

Returns

this

Inherited from

Button.pauseLayout


removeAllComponents()

ts
removeAllComponents(): this

Defined in: src/typescript/lib/core/Component.ts:2892

Removes all child components and their DOM elements without triggering layout.

Returns

this

This component, for method chaining.

Inherited from

Button.removeAllComponents


removeComponent()

ts
removeComponent(component: 
  | Number
  | Component<ComponentOptions>): 
  | undefined
  | null
  | LayoutConstraints

Defined in: src/typescript/lib/core/Component.ts:2862

Removes a child component by instance or index, detaches its element, and triggers layout.

Parameters

component

The Component instance to remove, or a Number index into the children array.

Number | Component<ComponentOptions>

Returns

| undefined | null | LayoutConstraints

The layout constraints that were registered for the removed component, or undefined.

Inherited from

Button.removeComponent


removeElement()

ts
removeElement(): this

Defined in: src/typescript/lib/core/Component.ts:449

Removes the component's DOM element from the document.

Returns

this

Inherited from

Button.removeElement


resumeLayout()

ts
resumeLayout(): this

Defined in: src/typescript/lib/core/Component.ts:3030

Resumes layout and immediately triggers a doLayout pass.

Returns

this

This component, for method chaining.

Inherited from

Button.resumeLayout


scheduleLayout()

ts
scheduleLayout(): this

Defined in: src/typescript/lib/core/Component.ts:3086

Queues a layout pass to run on the next animation frame. Multiple calls within the same frame coalesce into a single doLayout() call; if an ancestor is also scheduled, the ancestor's recursion subsumes this component and its scheduled pass is skipped.

Returns

this

This component, for method chaining.

Remarks

Honors pauseLayout(). Callers that need a synchronous layout commit (e.g. before reading getInnerSize) should call flushLayout() instead.

Inherited from

Button.scheduleLayout


setAnimation()

ts
setAnimation(value: string): this

Defined in: src/typescript/lib/core/Component.ts:2252

Sets the CSS animation shorthand on the component's CSS rule.

Parameters

value

string

A CSS animation shorthand (e.g. "ts-ui-spin 0.8s linear infinite").

Returns

this

This component, for method chaining.

Inherited from

Button.setAnimation


setAppearance()

ts
setAppearance(value: string): this

Defined in: src/typescript/lib/core/Component.ts:1298

Sets the CSS appearance on the element. Use clearAppearance to remove.

Parameters

value

string

A CSS appearance value (e.g. "none", "auto").

Returns

this

This component, for method chaining.

Inherited from

Button.setAppearance


setAttribute()

ts
setAttribute(key: string, value: string): this

Defined in: src/typescript/lib/core/Component.ts:708

Stores a component-level attribute and mirrors it onto the DOM element.

Parameters

key

string

The attribute name.

value

string

The attribute value. Passing null delegates to delAttribute.

Returns

this

Inherited from

Button.setAttribute


setAutoCommitStyle()

ts
setAutoCommitStyle(value: boolean): this

Defined in: src/typescript/lib/core/Component.ts:588

Enables or disables auto-commit; flushing all pending style and CSS rule changes when re-enabled.

Parameters

value

boolean

True to enable immediate commits; false to batch changes until manually flushed.

Returns

this

Inherited from

Button.setAutoCommitStyle


setBackgroundColor()

ts
setBackgroundColor(backgroundColor: string): this

Defined in: src/typescript/lib/core/Component.ts:934

Sets the background color CSS property. Use clearBackgroundColor to inherit.

Parameters

backgroundColor

string

A CSS color string.

Returns

this

This component, for method chaining.

Inherited from

Button.setBackgroundColor


setBackgroundImage()

ts
setBackgroundImage(backgroundImage: string): this

Defined in: src/typescript/lib/core/Component.ts:977

Sets the CSS background-image property. Use clearBackgroundImage to remove.

Parameters

backgroundImage

string

A CSS background-image string.

Returns

this

This component, for method chaining.

Inherited from

Button.setBackgroundImage


setBorder()

ts
setBorder(options: 
  | string
  | BorderOptions): this

Defined in: src/typescript/lib/core/Component.ts:1101

Creates and applies a border from options.

Parameters

options

Border configuration (style, width, color), or a CSS border shorthand string. Use clearBorder to clear the border explicitly.

string | BorderOptions

Returns

this

This component, for method chaining.

Inherited from

Button.setBorder


setBorderImage()

ts
setBorderImage(value: string): this

Defined in: src/typescript/lib/core/Component.ts:1341

Sets the CSS border-image shorthand on the element. Use clearBorderImage to remove.

Parameters

value

string

A CSS border-image value (e.g. "none").

Returns

this

This component, for method chaining.

Inherited from

Button.setBorderImage


setBorderRadius()

ts
setBorderRadius(borderRadius: string): this

Defined in: src/typescript/lib/core/Component.ts:1183

Sets the CSS border-radius on the element. Use clearBorderRadius to remove.

Parameters

borderRadius

string

A CSS border-radius string (e.g. "4px").

Returns

this

This component, for method chaining.

Inherited from

Button.setBorderRadius


setColorScheme()

ts
setColorScheme(colorScheme: string): this

Defined in: src/typescript/lib/core/Component.ts:1046

Parameters

colorScheme

string

Returns

this

This component, for method chaining.

Inherited from

Button.setColorScheme


setContain()

ts
setContain(value: string): this

Defined in: src/typescript/lib/core/Component.ts:2209

Sets the CSS contain property on the component's CSS rule. Hints the rendering engine that descendants are isolated from external layout/paint.

Parameters

value

string

A CSS contain value (e.g. "layout", "strict", "layout paint").

Returns

this

This component, for method chaining.

Inherited from

Button.setContain


setCursor()

ts
setCursor(cursor: string): this

Defined in: src/typescript/lib/core/Component.ts:1141

Sets the CSS cursor style on the element.

Parameters

cursor

string

A CSS cursor value (e.g. "pointer", "text", "default").

Returns

this

This component, for method chaining.

Inherited from

Button.setCursor


setDisabledAttribute()

ts
setDisabledAttribute(value: boolean): this

Defined in: src/typescript/lib/core/Component.ts:2298

Sets the HTML disabled attribute on the underlying element.

Distinct from setEnabled on input subclasses, which carries semantic + ARIA + visual state. This setter only toggles the HTML attribute.

Parameters

value

boolean

True to add disabled, false to remove it.

Returns

this

This component, for method chaining.

Inherited from

Button.setDisabledAttribute


setDisplay()

ts
setDisplay(value: string): this

Defined in: src/typescript/lib/core/Component.ts:2037

Sets the CSS display mode (e.g. "grid", "flex", "inline-block").

Updates the cached display so that setDisplayed restores the correct mode when toggling visibility, and writes through to the per-component CSS rule.

Parameters

value

string

A valid CSS display value.

Returns

this

This component, for method chaining.

Inherited from

Button.setDisplay


setDisplayed()

ts
setDisplayed(value: boolean): this

Defined in: src/typescript/lib/core/Component.ts:812

Shows or hides the component using CSS display; hidden components take no space.

Parameters

value

boolean

True to show the component, false to set display to "none".

Returns

this

This component, for method chaining.

Inherited from

Button.setDisplayed


setEnabled()

ts
setEnabled(enabled: boolean): this

Defined in: src/typescript/lib/component/button/Button.ts:717

Enables or disables the button.

Parameters

enabled

boolean

True to enable, false to disable.

Returns

this

Remarks

When disabled, sets the native disabled attribute on the underlying <button> element (which suppresses pointer events and :active), dims the button to 0.5 opacity, and switches the cursor to not-allowed. Re-enabling restores the previous cursor and clears the opacity override.

Inherited from

Button.setEnabled


setForegroundColor()

ts
setForegroundColor(foregroundColor: string): this

Defined in: src/typescript/lib/core/Component.ts:1012

Sets the CSS color (text color). Use clearForegroundColor to inherit.

Parameters

foregroundColor

string

A CSS color string.

Returns

this

This component, for method chaining.

Inherited from

Button.setForegroundColor


setGlyph()

ts
setGlyph(name: string): this

Defined in: src/typescript/lib/component/button/Button.ts:250

Sets or clears an optional leading Glyph shown alongside the button's text.

Parameters

name

string

Registry glyph name to display, or null to clear an existing glyph.

Returns

this

This component, for method chaining.

Remarks

The button's text always lives inside an HBox-laid-out content row centred by the outer Fit layout. This setter just swaps the leading glyph child of that row in or out — adding the glyph as the first child and re-appending the text after it to preserve the [glyph, text] order. Empty text combined with setGlyph(name) therefore renders as a glyph-only button with no visual artifacts at the default 0px spacing.

Inherited from

Button.setGlyph


setHeight()

ts
setHeight(height: number): this

Defined in: src/typescript/lib/core/Component.ts:1860

Sets the component height and updates the DOM element's inline style.

Parameters

height

number

The new height in pixels.

Returns

this

This component, for method chaining.

Inherited from

Button.setHeight


setHoverBackgroundColor()

ts
setHoverBackgroundColor(backgroundColor: string): this

Defined in: src/typescript/lib/component/button/Button.ts:524

Sets the background color for the :hover:not(:active) CSS rule.

Parameters

backgroundColor

string

A CSS color string, or null to clear the property.

Returns

this

This component, for method chaining.

Inherited from

Button.setHoverBackgroundColor


setHoverBackgroundImage()

ts
setHoverBackgroundImage(backgroundImage: string): this

Defined in: src/typescript/lib/component/button/Button.ts:559

Sets the background image for the :hover:not(:active) CSS rule.

Parameters

backgroundImage

string

A CSS background-image string, or null to clear the property.

Returns

this

This component, for method chaining.

Inherited from

Button.setHoverBackgroundImage


setHoverBorder()

ts
setHoverBorder(options?: BorderOptions): this

Defined in: src/typescript/lib/component/button/Button.ts:629

Sets the border for the :hover:not(:active) CSS rule.

Parameters

options?

BorderOptions

Optional. Border configuration (style, width, color). Omit to apply a default border.

Returns

this

This component, for method chaining.

Inherited from

Button.setHoverBorder


setHoverBorderRadius()

ts
setHoverBorderRadius(borderRadius: string): this

Defined in: src/typescript/lib/component/button/Button.ts:652

Sets the border radius for the :hover:not(:active) CSS rule.

Parameters

borderRadius

string

A CSS border-radius string, or null to clear the property.

Returns

this

This component, for method chaining.

Inherited from

Button.setHoverBorderRadius


setHoverForegroundColor()

ts
setHoverForegroundColor(foregroundColor: string): this

Defined in: src/typescript/lib/component/button/Button.ts:594

Sets the text color for the :hover:not(:active) CSS rule.

Parameters

foregroundColor

string

A CSS color string, or null to clear the property.

Returns

this

This component, for method chaining.

Inherited from

Button.setHoverForegroundColor


setHoverShadow()

ts
setHoverShadow(shadow: string): this

Defined in: src/typescript/lib/component/button/Button.ts:687

Sets the box shadow for the :hover:not(:active) CSS rule.

Parameters

shadow

string

A CSS box-shadow string, or null to set the shadow to "none".

Returns

this

This component, for method chaining.

Inherited from

Button.setHoverShadow


setId()

ts
setId(id: string): this

Defined in: src/typescript/lib/core/Component.ts:678

Sets the component ID and updates the DOM element's id attribute if the element exists.

Parameters

id

string

The new unique identifier for this component.

Returns

this

Inherited from

Button.setId


setInsets()

ts
setInsets(insets: Insets): this

Defined in: src/typescript/lib/core/Component.ts:846

Sets the component's insets. Use clearInsets to reset to zero.

Parameters

insets

Insets

The new Insets.

Returns

this

This component, for method chaining.

Inherited from

Button.setInsets


setLayoutConstraints()

ts
setLayoutConstraints(component: Component, constraints?: LayoutConstraints): 
  | undefined
  | LayoutConstraints

Defined in: src/typescript/lib/core/Component.ts:2950

Registers layout constraints for a child component with the layout manager.

Parameters

component

Component

The child component to constrain.

constraints?

LayoutConstraints

Optional. The layout constraints to apply.

Returns

| undefined | LayoutConstraints

Inherited from

Button.setLayoutConstraints


setLayoutManager()

ts
setLayoutManager(layoutManager: LayoutManager): this

Defined in: src/typescript/lib/core/Component.ts:2990

Detaches the current layout manager, attaches the new one, and stores the class name as an attribute.

Parameters

layoutManager

LayoutManager

The new LayoutManager to use for this component.

Returns

this

Inherited from

Button.setLayoutManager


setMaxSize()

ts
setMaxSize(width: number, height: number): this

Defined in: src/typescript/lib/core/Component.ts:1575

Sets the maximum size and applies it to the CSS rule.

Parameters

width

number

The maximum width in pixels. Pass Number.MAX_VALUE to remove the constraint.

height

number

The maximum height in pixels. Pass Number.MAX_VALUE to remove the constraint.

Returns

this

This component, for method chaining.

Inherited from

Button.setMaxSize


setMinSize()

ts
setMinSize(width: number, height: number): this

Defined in: src/typescript/lib/core/Component.ts:1508

Sets the minimum size and applies it to the CSS rule.

Parameters

width

number

The minimum width in pixels.

height

number

The minimum height in pixels.

Returns

this

This component, for method chaining.

Inherited from

Button.setMinSize


setOpacity()

ts
setOpacity(value: number): this

Defined in: src/typescript/lib/core/Component.ts:2393

Sets the CSS opacity property on the element.

Parameters

value

number

A number between 0 (fully transparent) and 1 (fully opaque). Use clearOpacity to remove the property.

Returns

this

This component, for method chaining.

Inherited from

Button.setOpacity


setOutline()

ts
setOutline(outline: string): this

Defined in: src/typescript/lib/core/Component.ts:1261

Sets the CSS outline on the element. Use clearOutline to remove.

Parameters

outline

string

A CSS outline value (e.g. "none", "2px solid blue").

Returns

this

This component, for method chaining.

Inherited from

Button.setOutline


setOverflow()

ts
setOverflow(overflow: string): this

Defined in: src/typescript/lib/core/Component.ts:2082

Sets the CSS overflow property on the component's CSS rule.

Parameters

overflow

string

A CSS overflow value (e.g. "hidden", "auto", "visible").

Returns

this

This component, for method chaining.

Inherited from

Button.setOverflow


setOverflowX()

ts
setOverflowX(value: string): this

Defined in: src/typescript/lib/core/Component.ts:2122

Sets the CSS overflow-x property on the component's CSS rule.

Parameters

value

string

A CSS overflow value (e.g. "hidden", "auto", "visible").

Returns

this

This component, for method chaining.

Inherited from

Button.setOverflowX


setOverflowY()

ts
setOverflowY(value: string): this

Defined in: src/typescript/lib/core/Component.ts:2165

Sets the CSS overflow-y property on the component's CSS rule.

Parameters

value

string

A CSS overflow value (e.g. "hidden", "auto", "visible").

Returns

this

This component, for method chaining.

Inherited from

Button.setOverflowY


setPadding()

ts
setPadding(padding: Insets): this

Defined in: src/typescript/lib/core/Component.ts:886

Sets the CSS padding. Use clearPadding to reset to "0px 0px 0px 0px".

Parameters

padding

Insets

The new padding Insets.

Returns

this

This component, for method chaining.

Inherited from

Button.setPadding


setPointerEvents()

ts
setPointerEvents(value: string): this

Defined in: src/typescript/lib/core/Component.ts:2352

Sets the CSS pointer-events property on the element.

Parameters

value

string

A CSS pointer-events value (e.g. "none", "auto").

Returns

this

This component, for method chaining.

Inherited from

Button.setPointerEvents


setPosition()

ts
setPosition(position: Position): this

Defined in: src/typescript/lib/core/Component.ts:2004

Sets the CSS position mode and updates the component's CSS rule.

Parameters

position

Position

The CSS position mode to apply (e.g. Position.ABSOLUTE, Position.STATIC).

Returns

this

This component, for method chaining.

Inherited from

Button.setPosition


setPreferredSize()

ts
setPreferredSize(width: number, height: number): this

Defined in: src/typescript/lib/core/Component.ts:1444

Sets an explicit preferred size; triggers the onPreferredSizeChange callback if changed.

Parameters

width

number

The preferred width in pixels.

height

number

The preferred height in pixels.

Returns

this

This component, for method chaining.

Inherited from

Button.setPreferredSize


setPressedBackgroundColor()

ts
setPressedBackgroundColor(backgroundColor: string): this

Defined in: src/typescript/lib/component/button/Button.ts:326

Sets the background color for the :active CSS rule.

Parameters

backgroundColor

string

A CSS color string, or null to clear the property.

Returns

this

This component, for method chaining.

Inherited from

Button.setPressedBackgroundColor


setPressedBackgroundImage()

ts
setPressedBackgroundImage(backgroundImage: string): this

Defined in: src/typescript/lib/component/button/Button.ts:361

Sets the background image for the :active CSS rule.

Parameters

backgroundImage

string

Optional. A CSS background-image string, or null to clear the property.

Returns

this

This component, for method chaining.

Inherited from

Button.setPressedBackgroundImage


setPressedBorder()

ts
setPressedBorder(options?: BorderOptions): this

Defined in: src/typescript/lib/component/button/Button.ts:431

Sets the border for the :active CSS rule.

Parameters

options?

BorderOptions

Optional. Border configuration (style, width, color). Omit to apply a default border.

Returns

this

This component, for method chaining.

Inherited from

Button.setPressedBorder


setPressedBorderRadius()

ts
setPressedBorderRadius(borderRadius: string): this

Defined in: src/typescript/lib/component/button/Button.ts:454

Sets the border radius for the :active CSS rule.

Parameters

borderRadius

string

Optional. A CSS border-radius string, or null to clear the property.

Returns

this

This component, for method chaining.

Inherited from

Button.setPressedBorderRadius


setPressedForegroundColor()

ts
setPressedForegroundColor(foregroundColor: string): this

Defined in: src/typescript/lib/component/button/Button.ts:396

Sets the text color for the :active CSS rule.

Parameters

foregroundColor

string

A CSS color string, or null to clear the property.

Returns

this

This component, for method chaining.

Inherited from

Button.setPressedForegroundColor


setPressedShadow()

ts
setPressedShadow(shadow: string): this

Defined in: src/typescript/lib/component/button/Button.ts:489

Sets the box shadow for the :active CSS rule.

Parameters

shadow

string

A CSS box-shadow string, or null to set the shadow to "none".

Returns

this

This component, for method chaining.

Inherited from

Button.setPressedShadow


setShadow()

ts
setShadow(shadow: string): this

Defined in: src/typescript/lib/core/Component.ts:1224

Sets the CSS box-shadow. Use clearShadow to set the shadow to "none".

Parameters

shadow

string

A CSS box-shadow string.

Returns

this

This component, for method chaining.

Inherited from

Button.setShadow


setSize()

ts
setSize(size: Size): this

Defined in: src/typescript/lib/core/Component.ts:1782

Sets width and height, updates the DOM element, and triggers doLayout.

Parameters

size

Size

The new Size with width and height in pixels.

Returns

this

This component, for method chaining.

Inherited from

Button.setSize


setTransform()

ts
setTransform(value: string): this

Defined in: src/typescript/lib/core/Component.ts:1384

Sets the CSS transform on the element. Use clearTransform to remove.

Parameters

value

string

A CSS transform value (e.g. "translateY(-1px)").

Returns

this

This component, for method chaining.

Inherited from

Button.setTransform


setTranslate()

ts
setTranslate(x: number, y: number): this

Defined in: src/typescript/lib/core/Component.ts:1971

Writes the element's transform to translate3d(x, y, 0). This positions on the compositor without triggering layout/paint, complementing setX/setY (left/top). Visual position of the element is left + translateX, top + translateY.

Parameters

x

number

Translate-X in pixels.

y

number

Translate-Y in pixels.

Returns

this

This component, for method chaining.

Inherited from

Button.setTranslate


setUserSelect()

ts
setUserSelect(value: string): this

Defined in: src/typescript/lib/core/Component.ts:2513

Sets the CSS user-select property on the element.

Parameters

value

string

A CSS user-select value (e.g. "none", "auto", "text").

Returns

this

This component, for method chaining.

Inherited from

Button.setUserSelect


setVerticalAlign()

ts
setVerticalAlign(align: string): this

Defined in: src/typescript/lib/core/Component.ts:1725

Parameters

align

string

Returns

this

This component, for method chaining.

Inherited from

Button.setVerticalAlign


setVisible()

ts
setVisible(value: Boolean): this

Defined in: src/typescript/lib/core/Component.ts:749

Sets visibility; true = visible, false = hidden, null/falsy = inherit from parent.

Parameters

value

Boolean

True to show the component, false to hide it, or a falsy non-boolean to inherit.

Returns

this

Remarks

Throws an Error if value is a non-boolean truthy value.

Inherited from

Button.setVisible


setWhiteSpace()

ts
setWhiteSpace(value: string): this

Defined in: src/typescript/lib/core/Component.ts:2472

Sets the CSS white-space property on the component's CSS rule.

Parameters

value

string

A CSS white-space value (e.g. "nowrap", "normal", "pre").

Returns

this

This component, for method chaining.

Remarks

Previously declared on Text; promoted to Component because the property has no Text-specific semantics. The _whiteSpace backing field that applyStyle already consults on re-render lives here, so caching during the setter call keeps the post-render state in lockstep with the cached value.

Inherited from

Button.setWhiteSpace


setWidth()

ts
setWidth(width: number): this

Defined in: src/typescript/lib/core/Component.ts:1822

Sets the component width and updates the DOM element's inline style.

Parameters

width

number

The new width in pixels.

Returns

this

This component, for method chaining.

Inherited from

Button.setWidth


setWillChange()

ts
setWillChange(value: null | string): this

Defined in: src/typescript/lib/core/Component.ts:2437

Sets the CSS will-change hint on the element, pre-promoting it to its own compositor layer so the first transform/scroll frame doesn't pay a layer-creation cost. Pass null to clear the hint and release the layer.

Parameters

value

A CSS will-change value (e.g. "transform") or null to clear.

null | string

Returns

this

This component, for method chaining.

Remarks

The hint costs GPU memory and is ignored by browsers past a per-page threshold (~50–100 elements). Set it only over the active-motion lifetime (drag, pool membership, scroll-target lifetime) and clear it promptly when motion ends.

Inherited from

Button.setWillChange


setX()

ts
setX(x: number): this

Defined in: src/typescript/lib/core/Component.ts:1893

Sets the CSS left position and updates the DOM element's inline style.

Parameters

x

number

The horizontal offset in pixels.

Returns

this

This component, for method chaining.

Inherited from

Button.setX


setY()

ts
setY(y: number): this

Defined in: src/typescript/lib/core/Component.ts:1926

Sets the CSS top position and updates the DOM element's inline style.

Parameters

y

number

The vertical offset in pixels.

Returns

this

This component, for method chaining.

Inherited from

Button.setY


setZIndex()

ts
setZIndex(value: number): this

Defined in: src/typescript/lib/core/Component.ts:781

Sets the CSS z-index of the component.

Parameters

value

number

The z-index value.

Returns

this

Inherited from

Button.setZIndex


sortComponents()

ts
sortComponents(comparator: 
  | undefined
  | Comparator<Component<ComponentOptions>, Component<ComponentOptions>>): this

Defined in: src/typescript/lib/core/Component.ts:2912

Sorts the children array in place using the given comparator function.

Parameters

comparator

Optional. A comparator function that receives two Components and returns a number.

undefined | Comparator<Component<ComponentOptions>, Component<ComponentOptions>>

Returns

this

This component, for method chaining.

Inherited from

Button.sortComponents


sync()

ts
sync(): void

Defined in: src/typescript/lib/core/Component.ts:2721

Re-applies all styles to the existing DOM element, syncing state after external changes.

Returns

void

Inherited from

Button.sync


unfocus()

ts
unfocus(): this

Defined in: src/typescript/lib/core/Component.ts:2559

Removes browser focus from this component's DOM element.

Returns

this

This component, for method chaining.

Inherited from

Button.unfocus