npm.devtool.tech
๐Ÿ‘ You can access figures package with using figures variable in browser devtools!
Unicode symbols with fallbacks for older terminals

code/package/bundle size

0B
publish
0B
install
0B
bundle minified
0B
bundle gzipped

figures

Unicode symbols with fallbacks for older terminals

and more...

Terminals such as Windows Console Host (and CMD) only support a limited character set.

Install

$ npm install figures

Usage

import figures, {replaceSymbols, mainSymbols, fallbackSymbols} from 'figures';

console.log(figures.tick);
// On terminals with Unicode symbols:  โœ”๏ธŽ
// On other terminals:                 โˆš

console.log(figures.mainSymbols.tick);
// On all terminals:  โœ”๏ธŽ

console.log(figures.fallbackSymbols.tick);
// On all terminal:  โˆš

console.log(figures.replaceSymbols('โœ”๏ธŽ check'));
// On terminals with Unicode symbols:  โœ”๏ธŽ check
// On other terminals:                 โˆš check

API

figures (default export)

Type: object

Symbols to use on any terminal.

mainSymbols

Symbols to use when the terminal supports Unicode symbols.

fallbackSymbols

Symbols to use when the terminal does not support Unicode symbols.

replaceSymbols(string)

Returns the input with replaced fallback Unicode symbols on older terminals.

All the below figures are attached to the default export as shown in the example above.

string

Type: string

String where the Unicode symbols will be replaced with fallback symbols depending on the terminal.

Figures

Fallback characters are only shown when they differ from the Main ones.

NameMainFallback
tickโœ”โˆš
infoโ„นi
warningโš โ€ผ
crossโœ–ร—
squareโ–ˆ
squareSmallโ—ปโ–ก
squareSmallFilledโ—ผโ– 
squareDarkShadeโ–“
squareMediumShadeโ–’
squareLightShadeโ–‘
squareTopโ–€
squareBottomโ–„
squareLeftโ–Œ
squareRightโ–
squareCenterโ– 
circleโ—ฏ( )
circleFilledโ—‰(*)
circleDottedโ—Œ( )
circleDoubleโ—Ž( )
circleCircleโ“ž(โ—‹)
circleCrossโ“ง(ร—)
circlePipeโ’พ(โ”‚)
circleQuestionMark?โƒ (?)
radioOnโ—‰(*)
radioOffโ—ฏ( )
checkboxOnโ˜’[ร—]
checkboxOffโ˜[ ]
checkboxCircleOnโ“ง(ร—)
checkboxCircleOffโ’พ( )
questionMarkPrefix?โƒ ๏ผŸ
bulletโ—
dotโ€ค
ellipsisโ€ฆ
pointerโฏ>
pointerSmallโ€บโ€บ
triangleUpโ–ฒ
triangleUpSmallโ–ด
triangleUpOutlineโ–ณโˆ†
triangleDownโ–ผ
triangleDownSmallโ–พ
triangleLeftโ—€โ—„
triangleLeftSmallโ—‚
triangleRightโ–ถโ–บ
triangleRightSmallโ–ธ
lozengeโ—†โ™ฆ
lozengeOutlineโ—‡โ—Š
homeโŒ‚
hamburgerโ˜ฐโ‰ก
smileyใ‹กโ˜บ
mustacheเทดโ”Œโ”€โ”
heartโ™ฅ
starโ˜…โœถ
playโ–ถโ–บ
musicNoteโ™ช
musicNoteBeamedโ™ซ
nodejsโฌขโ™ฆ
arrowUpโ†‘
arrowDownโ†“
arrowLeftโ†
arrowRightโ†’
arrowLeftRightโ†”
arrowUpDownโ†•
almostEqualโ‰ˆ
notEqualโ‰ 
lessOrEqualโ‰ค
greaterOrEqualโ‰ฅ
identicalโ‰ก
infinityโˆž
subscriptZeroโ‚€
subscriptOneโ‚
subscriptTwoโ‚‚
subscriptThreeโ‚ƒ
subscriptFourโ‚„
subscriptFiveโ‚…
subscriptSixโ‚†
subscriptSevenโ‚‡
subscriptEightโ‚ˆ
subscriptNineโ‚‰
oneHalfยฝ
oneThirdโ…“
oneQuarterยผ
oneFifthโ…•
oneSixthโ…™
oneSeventhโ…1/7
oneEighthโ…›
oneNinthโ…‘1/9
oneTenthโ…’1/10
twoThirdsโ…”
twoFifthsโ…–
threeQuartersยพ
threeFifthsโ…—
threeEighthsโ…œ
fourFifthsโ…˜
fiveSixthsโ…š
fiveEighthsโ…
sevenEighthsโ…ž
lineโ”€
lineBoldโ”
lineDoubleโ•
lineDashed0โ”„
lineDashed1โ”…
lineDashed2โ”ˆ
lineDashed3โ”‰
lineDashed4โ•Œ
lineDashed5โ•
lineDashed6โ•ด
lineDashed7โ•ถ
lineDashed8โ•ธ
lineDashed9โ•บ
lineDashed10โ•ผ
lineDashed11โ•พ
lineDashed12โˆ’
lineDashed13โ€“
lineDashed14โ€
lineDashed15โƒ
lineVerticalโ”‚
lineVerticalBoldโ”ƒ
lineVerticalDoubleโ•‘
lineVerticalDashed0โ”†
lineVerticalDashed1โ”‡
lineVerticalDashed2โ”Š
lineVerticalDashed3โ”‹
lineVerticalDashed4โ•Ž
lineVerticalDashed5โ•
lineVerticalDashed6โ•ต
lineVerticalDashed7โ•ท
lineVerticalDashed8โ•น
lineVerticalDashed9โ•ป
lineVerticalDashed10โ•ฝ
lineVerticalDashed11โ•ฟ
lineDownLeftโ”
lineDownLeftArcโ•ฎ
lineDownBoldLeftBoldโ”“
lineDownBoldLeftโ”’
lineDownLeftBoldโ”‘
lineDownDoubleLeftDoubleโ•—
lineDownDoubleLeftโ•–
lineDownLeftDoubleโ••
lineDownRightโ”Œ
lineDownRightArcโ•ญ
lineDownBoldRightBoldโ”
lineDownBoldRightโ”Ž
lineDownRightBoldโ”
lineDownDoubleRightDoubleโ•”
lineDownDoubleRightโ•“
lineDownRightDoubleโ•’
lineUpLeftโ”˜
lineUpLeftArcโ•ฏ
lineUpBoldLeftBoldโ”›
lineUpBoldLeftโ”š
lineUpLeftBoldโ”™
lineUpDoubleLeftDoubleโ•
lineUpDoubleLeftโ•œ
lineUpLeftDoubleโ•›
lineUpRightโ””
lineUpRightArcโ•ฐ
lineUpBoldRightBoldโ”—
lineUpBoldRightโ”–
lineUpRightBoldโ”•
lineUpDoubleRightDoubleโ•š
lineUpDoubleRightโ•™
lineUpRightDoubleโ•˜
lineUpDownLeftโ”ค
lineUpBoldDownBoldLeftBoldโ”ซ
lineUpBoldDownBoldLeftโ”จ
lineUpDownLeftBoldโ”ฅ
lineUpBoldDownLeftBoldโ”ฉ
lineUpDownBoldLeftBoldโ”ช
lineUpDownBoldLeftโ”ง
lineUpBoldDownLeftโ”ฆ
lineUpDoubleDownDoubleLeftDoubleโ•ฃ
lineUpDoubleDownDoubleLeftโ•ข
lineUpDownLeftDoubleโ•ก
lineUpDownRightโ”œ
lineUpBoldDownBoldRightBoldโ”ฃ
lineUpBoldDownBoldRightโ” 
lineUpDownRightBoldโ”
lineUpBoldDownRightBoldโ”ก
lineUpDownBoldRightBoldโ”ข
lineUpDownBoldRightโ”Ÿ
lineUpBoldDownRightโ”ž
lineUpDoubleDownDoubleRightDoubleโ• 
lineUpDoubleDownDoubleRightโ•Ÿ
lineUpDownRightDoubleโ•ž
lineDownLeftRightโ”ฌ
lineDownBoldLeftBoldRightBoldโ”ณ
lineDownLeftBoldRightBoldโ”ฏ
lineDownBoldLeftRightโ”ฐ
lineDownBoldLeftBoldRightโ”ฑ
lineDownBoldLeftRightBoldโ”ฒ
lineDownLeftRightBoldโ”ฎ
lineDownLeftBoldRightโ”ญ
lineDownDoubleLeftDoubleRightDoubleโ•ฆ
lineDownDoubleLeftRightโ•ฅ
lineDownLeftDoubleRightDoubleโ•ค
lineUpLeftRightโ”ด
lineUpBoldLeftBoldRightBoldโ”ป
lineUpLeftBoldRightBoldโ”ท
lineUpBoldLeftRightโ”ธ
lineUpBoldLeftBoldRightโ”น
lineUpBoldLeftRightBoldโ”บ
lineUpLeftRightBoldโ”ถ
lineUpLeftBoldRightโ”ต
lineUpDoubleLeftDoubleRightDoubleโ•ฉ
lineUpDoubleLeftRightโ•จ
lineUpLeftDoubleRightDoubleโ•ง
lineUpDownLeftRightโ”ผ
lineUpBoldDownBoldLeftBoldRightBoldโ•‹
lineUpDownBoldLeftBoldRightBoldโ•ˆ
lineUpBoldDownLeftBoldRightBoldโ•‡
lineUpBoldDownBoldLeftRightBoldโ•Š
lineUpBoldDownBoldLeftBoldRightโ•‰
lineUpBoldDownLeftRightโ•€
lineUpDownBoldLeftRightโ•
lineUpDownLeftBoldRightโ”ฝ
lineUpDownLeftRightBoldโ”พ
lineUpBoldDownBoldLeftRightโ•‚
lineUpDownLeftBoldRightBoldโ”ฟ
lineUpBoldDownLeftBoldRightโ•ƒ
lineUpBoldDownLeftRightBoldโ•„
lineUpDownBoldLeftBoldRightโ•…
lineUpDownBoldLeftRightBoldโ•†
lineUpDoubleDownDoubleLeftDoubleRightDoubleโ•ฌ
lineUpDoubleDownDoubleLeftRightโ•ซ
lineUpDownLeftDoubleRightDoubleโ•ช
lineCrossโ•ณ
lineBackslashโ•ฒ
lineSlashโ•ฑ

Other characters

If you cannot find the character you're looking for in the table above, please look at this full list of cross-platform terminal characters.

Unsupported terminals

The following terminals are not officially supported:

  • xterm
  • Linux Terminal (kernel)
  • cmder

They can display most but not all of the symbols listed above.

Related


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
๐Ÿ”ŽExplore Package๐Ÿ”ŽCDN Script

Score

Popularity62/100
Quality84/100
Maintenance100/100