2.4.4 • Published 6 months ago

@types/textfit v2.4.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/textfit

Summary

This package contains type definitions for textfit (https://github.com/STRML/textFit).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/textfit.

index.d.ts

// Type definitions for textfit 2.4
// Project: https://github.com/STRML/textFit
// Definitions by: Muhun Kim <https://github.com/x86chi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="jquery" />

declare function textFit(
    els: HTMLElement | HTMLElement[] | NodeListOf<Element> | HTMLCollection | JQuery,
    options?: textFit.TextFitOption,
): void;

export = textFit;

declare namespace textFit {
    interface TextFitOption {
        /**
         *  if true, textFit will align vertically using css tables
         *  @default false
         */
        alignVert?: boolean | undefined;

        /**
         *  if true, textFit will set text-align: center
         *  @default false
         */
        alignHoriz?: boolean | undefined;

        /**
         *  if true, textFit will not set white-space: no-wrap
         *  @default false
         */
        multiLine?: boolean | undefined;

        /**
         *  disable to turn off automatic multi-line sensing
         *  @default true
         */
        detectMultiLine?: boolean | undefined;

        /**
         *  @default 6
         */
        minFontSize?: number | undefined;

        /**
         *  @default 80
         */
        maxFontSize?: number | undefined;

        /**
         *  if true, textFit will re-process already-fit nodes. Set to 'false' for better performance
         *  @default true
         */
        reProcess?: boolean | undefined;

        /**
         *  if true, textFit will fit text to element width, regardless of text height
         *  @default false
         */
        widthOnly?: boolean | undefined;

        /**
         *  if true, textFit will use flexbox for vertical alignment
         *  @default false
         */
        alignVertWithFlexbox?: boolean | undefined;
    }
}

export as namespace textFit;

Additional Details

  • Last updated: Fri, 11 Mar 2022 08:01:42 GMT
  • Dependencies: @types/jquery
  • Global values: textFit

Credits

These definitions were written by Muhun Kim.

2.4.3

7 months ago

2.4.4

6 months ago

2.4.2

2 years ago

2.4.1

3 years ago

2.4.0

3 years ago