Product Promotion
0x5a.live
for different kinds of informations and explorations.
GitHub - sindresorhus/figures: Unicode symbols with fallbacks for older terminals
Unicode symbols with fallbacks for older terminals - sindresorhus/figures
Visit SiteGitHub - sindresorhus/figures: Unicode symbols with fallbacks for older terminals
Unicode symbols with fallbacks for older terminals - sindresorhus/figures
Powered by 0x5a.live š
figures
Unicode symbols with fallbacks for older terminals
Terminals such as Windows Console Host (and CMD) only support a limited character set.
Install
npm install figures
Usage
import figures, {mainSymbols, fallbackSymbols, replaceSymbols} from 'figures';
console.log(figures.tick);
// On terminals with Unicode symbols: ā
// On other terminals: ā
console.log(mainSymbols.tick);
// On all terminals: ā
console.log(fallbackSymbols.tick);
// On all terminals: ā
console.log(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, options?)
Returns the input with replaced fallback symbols if the terminal has poor Unicode support.
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.
options
Type: object
useFallback
Type: boolean
Default: true
if the terminal has poor Unicode support
Whether to replace symbols with fallbacks.
This can be set to true
to always use fallback symbols, whether the terminal has poor Unicode support or not.
import {replaceSymbols} from 'figures';
console.log(replaceSymbols('ā check', {useFallback: true}));
// On terminals with Unicode symbols: ā check
// On other terminals: ā check
Figures
Fallback
characters are only shown when they differ from the Main
ones.
Name | Main | Fallback |
---|---|---|
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
- log-symbols - Colored symbols for various log levels
NodeJS Resources
are all listed below.
Made with ā¤ļø
to provide different kinds of informations and resources.