Skip to content

Character Sets

Presets

Pass any preset name as the chars option:

PresetCharactersBest For
blocks█▓▒░Terminal / cyberpunk aesthetic
shades░▒▓Subtle density transitions
braille⠁⠂⠃...⠿ (64 chars)Dot-matrix / retro
katakanaアイウ...ン (46 chars)Matrix-style Japanese glyphs
binary01Digital / hacker
hex0123456789ABCDEFHexadecimal / data
numbers0123456789Numeric decoder
lowercasea-zSubtle letter scramble
uppercaseA-ZBold letter scramble
symbols!@#$%^&*()_+-=[]{}...Cryptographic noise

Custom Characters

Pass any string to use your own character set:

scramble(el, {
text: 'Hello',
chars: '⚡🔥💀👾', // Emoji scramble
})
scramble(el, {
text: 'Price: $42.00',
chars: '$€£¥₿', // Currency symbols
})

Combining with Cursor

The cursor option adds a sweep pattern at the reveal front. It works independently from chars:

scramble(el, {
text: 'Decrypting...',
chars: 'blocks',
cursor: '░▒▓█', // Block-style cursor sweep
})
scramble(el, {
text: 'Loading',
chars: 'binary',
cursor: '', // Simple bar cursor
})

Accessing Presets Programmatically

import { CHARSETS } from '@scrambl/core'
console.log(CHARSETS.katakana)
// → "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン"