tuil
ReferencePackages@mwillbanks/tuil-inkAPI

ButtonProps

interface exported by @mwillbanks/tuil-ink.

View rawEdit

interface

Public interface exported by @mwillbanks/tuil-ink.

export interface ButtonProps
  extends CommonComponentProps,
    SlottedComponentProps<
      ButtonSlots,
      { readonly focused: boolean; readonly disabled: boolean }
    > {
  readonly children?: ReactNode;
  readonly onPress?: () => void | Promise<void>;
  readonly command?: string;
  readonly hotkeys?: readonly string[];
  readonly autoFocus?: boolean;
  readonly prefix?: ReactNode;
  readonly suffix?: ReactNode;
  readonly focusOrder?: number;
  readonly focusScopeId?: string;
}

Members

MemberTypeRequiredDescriptionRelated types
childrenReactNodeNoThe children member uses the ReactNode contract.
onPress(() => void | Promise<void>) | undefinedNoThe onPress member uses the (() => void | Promise<void>) | undefined contract.
commandstring | undefinedNoThe command member uses the string | undefined contract.
hotkeysreadonly string[] | undefinedNoThe hotkeys member uses the readonly string[] | undefined contract.
autoFocusboolean | undefinedNoThe autoFocus member uses the boolean | undefined contract.
prefixReactNodeNoThe prefix member uses the ReactNode contract.
suffixReactNodeNoThe suffix member uses the ReactNode contract.
focusOrdernumber | undefinedNoThe focusOrder member uses the number | undefined contract.
focusScopeIdstring | undefinedNoThe focusScopeId member uses the string | undefined contract.
variantstring | undefinedNoThe variant member uses the string | undefined contract.
size"sm" | "md" | "lg" | undefinedNoThe size member uses the "sm" | "md" | "lg" | undefined contract.
unstyledboolean | undefinedNoThe unstyled member uses the boolean | undefined contract.
classNamestring | undefinedNoThe className member uses the string | undefined contract.
layoutPartial<Omit<LayoutNodeInput, "children" | "id" | "semantics">> | undefinedNoThe layout member uses the Partial<Omit<LayoutNodeInput, "children" | "id" | "semantics">> | undefined contract.
idstring | undefinedNoThe id member uses the string | undefined contract.
testIdstring | undefinedNoThe testId member uses the string | undefined contract.
roleSemanticRole | undefinedNoThe role member uses the SemanticRole | undefined contract.SemanticRole
labelstring | undefinedNoThe label member uses the string | undefined contract.
descriptionstring | undefinedNoThe description member uses the string | undefined contract.
disabledboolean | undefinedNoThe disabled member uses the boolean | undefined contract.
readOnlyboolean | undefinedNoThe readOnly member uses the boolean | undefined contract.
selectedboolean | undefinedNoThe selected member uses the boolean | undefined contract.
checkedboolean | undefinedNoThe checked member uses the boolean | undefined contract.
expandedboolean | undefinedNoThe expanded member uses the boolean | undefined contract.
valueTextstring | undefinedNoThe valueText member uses the string | undefined contract.
slotsPartial<SlotComponents<&#123; root: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").BoxProps; label: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; prefix: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; suffix: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; &#125;>> | undefinedNoThe slots member uses the Partial<SlotComponents<&#123; root: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").BoxProps; label: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; prefix: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; suffix: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; &#125;>> | undefined contract.BoxProps, SlotComponents, TextProps
slotPropsPartial<SlotProps<&#123; root: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").BoxProps; label: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; prefix: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; suffix: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; &#125;, &#123; readonly focused: boolean; readonly disabled: boolean; &#125;>> | undefinedNoThe slotProps member uses the Partial<SlotProps<&#123; root: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").BoxProps; label: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; prefix: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; suffix: import(".bun/ink@7.1.1+fb5bfe3da9a88d96/node_modules/ink").TextProps; &#125;, &#123; readonly focused: boolean; readonly disabled: boolean; &#125;>> | undefined contract.BoxProps, SlotProps, TextProps

Parameters

This declaration has no public members.

Returns

This declaration does not return a value.

Throws

No thrown errors are documented for this declaration.

Source

View the secondary source reference

Package

@mwillbanks/tuil-ink

On this page