Documentation
¶
Overview ¶
Package spinner provides spinner animation styles and presets for clog.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Aesthetic = Style{ Frames: []string{ "▰▱▱▱▱▱▱", "▰▰▱▱▱▱▱", "▰▰▰▱▱▱▱", "▰▰▰▰▱▱▱", "▰▰▰▰▰▱▱", "▰▰▰▰▰▰▱", "▰▰▰▰▰▰▰", "▰▱▱▱▱▱▱", }, Interval: 80 * time.Millisecond, } Arc = Style{ Frames: []string{"◜", "◠", "◝", "◞", "◡", "◟"}, Interval: 100 * time.Millisecond, } Arrow2 = Style{ Frames: []string{"⬆️ ", "↗️ ", "➡️ ", "↘️ ", "⬇️ ", "↙️ ", "⬅️ ", "↖️ "}, Interval: 80 * time.Millisecond, } Arrow3 = Style{ Frames: []string{"▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"}, Interval: 120 * time.Millisecond, } Balloon = Style{ Frames: []string{" ", ".", "o", "O", "@", "*", " "}, Interval: 140 * time.Millisecond, } Balloon2 = Style{ Frames: []string{".", "o", "O", "°", "O", "o", "."}, Interval: 120 * time.Millisecond, } BetaWave = Style{ Frames: []string{ "ρββββββ", "βρβββββ", "ββρββββ", "βββρβββ", "ββββρββ", "βββββρβ", "ββββββρ", }, Interval: 80 * time.Millisecond, } Binary = Style{ Frames: []string{ "010010", "001100", "100101", "111010", "111101", "010111", "101011", "111000", "110011", "110101", }, Interval: 80 * time.Millisecond, } BluePulse = Style{ Frames: []string{"🔹 ", "🔷 ", "🔵 ", "🔵 ", "🔷 "}, Interval: 100 * time.Millisecond, } BouncingBall = Style{ Frames: []string{ "( ● )", "( ● )", "( ● )", "( ● )", "( ●)", "( ● )", "( ● )", "( ● )", "( ● )", "(● )", }, Interval: 80 * time.Millisecond, } BoxBounce = Style{ Frames: []string{"▖", "▘", "▝", "▗"}, Interval: 120 * time.Millisecond, } BoxBounce2 = Style{ Frames: []string{"▌", "▀", "▐", "▄"}, Interval: 100 * time.Millisecond, } Christmas = Style{ Frames: []string{"🌲", "🎄"}, Interval: 400 * time.Millisecond, } Circle = Style{ Frames: []string{"◡", "⊙", "◠"}, Interval: 120 * time.Millisecond, } CircleHalves = Style{ Frames: []string{"◐", "◓", "◑", "◒"}, Interval: 50 * time.Millisecond, } CircleQuarters = Style{ Frames: []string{"◴", "◷", "◶", "◵"}, Interval: 120 * time.Millisecond, } Dot = Style{ Frames: []string{"⣾ ", "⣽ ", "⣻ ", "⢿ ", "⡿ ", "⣟ ", "⣯ ", "⣷ "}, Interval: 100 * time.Millisecond, } Dots = Style{ Frames: []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}, Interval: 80 * time.Millisecond, } DotsBounce = Style{ Frames: []string{"⠋", "⠙", "⠚", "⠞", "⠖", "⠦", "⠴", "⠲", "⠳", "⠓"}, Interval: 100 * time.Millisecond, } Dots11 = Style{ Frames: []string{"⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"}, Interval: 100 * time.Millisecond, } Dots12 = Style{ Frames: []string{ "⢀⠀", "⡀⠀", "⠄⠀", "⢂⠀", "⡂⠀", "⠅⠀", "⢃⠀", "⡃⠀", "⠍⠀", "⢋⠀", "⡋⠀", "⠍⠁", "⢋⠁", "⡋⠁", "⠍⠉", "⠋⠉", "⠋⠉", "⠉⠙", "⠉⠙", "⠉⠩", "⠈⢙", "⠈⡙", "⢈⠩", "⡀⢙", "⠄⡙", "⢂⠩", "⡂⢘", "⠅⡘", "⢃⠨", "⡃⢐", "⠍⡐", "⢋⠠", "⡋⢀", "⠍⡁", "⢋⠁", "⡋⠁", "⠍⠉", "⠋⠉", "⠋⠉", "⠉⠙", "⠉⠙", "⠉⠩", "⠈⢙", "⠈⡙", "⠈⠩", "⠀⢙", "⠀⡙", "⠀⠩", "⠀⢘", "⠀⡘", "⠀⠨", "⠀⢐", "⠀⡐", "⠀⠠", "⠀⢀", "⠀⡀", }, Interval: 80 * time.Millisecond, } Dots13 = Style{ Frames: []string{"⣼", "⣹", "⢻", "⠿", "⡟", "⣏", "⣧", "⣶"}, Interval: 80 * time.Millisecond, } Dots14 = Style{ Frames: []string{ "⠉⠉", "⠈⠙", "⠀⠹", "⠀⢸", "⠀⣰", "⢀⣠", "⣀⣀", "⣄⡀", "⣆⠀", "⡇⠀", "⠏⠀", "⠋⠁", }, Interval: 80 * time.Millisecond, } Dots3 = Style{ Frames: []string{"⠋", "⠙", "⠚", "⠞", "⠖", "⠦", "⠴", "⠲", "⠳", "⠓"}, Interval: 80 * time.Millisecond, } Dots4 = Style{ Frames: []string{ "⠄", "⠆", "⠇", "⠋", "⠙", "⠸", "⠰", "⠠", "⠰", "⠸", "⠙", "⠋", "⠇", "⠆", }, Interval: 80 * time.Millisecond, } Dots5 = Style{ Frames: []string{ "⠋", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", }, Interval: 80 * time.Millisecond, } Dots6 = Style{ Frames: []string{ "⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠴", "⠲", "⠒", "⠂", "⠂", "⠒", "⠚", "⠙", "⠉", "⠁", }, Interval: 80 * time.Millisecond, } Dots7 = Style{ Frames: []string{ "⠈", "⠉", "⠋", "⠓", "⠒", "⠐", "⠐", "⠒", "⠖", "⠦", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈", }, Interval: 80 * time.Millisecond, } Dots8 = Style{ Frames: []string{ "⠁", "⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈", "⠈", }, Interval: 80 * time.Millisecond, } Dots8Bit = Style{ Frames: []string{ "⠀", "⠁", "⠂", "⠃", "⠄", "⠅", "⠆", "⠇", "⡀", "⡁", "⡂", "⡃", "⡄", "⡅", "⡆", "⡇", "⠈", "⠉", "⠊", "⠋", "⠌", "⠍", "⠎", "⠏", "⡈", "⡉", "⡊", "⡋", "⡌", "⡍", "⡎", "⡏", "⠐", "⠑", "⠒", "⠓", "⠔", "⠕", "⠖", "⠗", "⡐", "⡑", "⡒", "⡓", "⡔", "⡕", "⡖", "⡗", "⠘", "⠙", "⠚", "⠛", "⠜", "⠝", "⠞", "⠟", "⡘", "⡙", "⡚", "⡛", "⡜", "⡝", "⡞", "⡟", "⠠", "⠡", "⠢", "⠣", "⠤", "⠥", "⠦", "⠧", "⡠", "⡡", "⡢", "⡣", "⡤", "⡥", "⡦", "⡧", "⠨", "⠩", "⠪", "⠫", "⠬", "⠭", "⠮", "⠯", "⡨", "⡩", "⡪", "⡫", "⡬", "⡭", "⡮", "⡯", "⠰", "⠱", "⠲", "⠳", "⠴", "⠵", "⠶", "⠷", "⡰", "⡱", "⡲", "⡳", "⡴", "⡵", "⡶", "⡷", "⠸", "⠹", "⠺", "⠻", "⠼", "⠽", "⠾", "⠿", "⡸", "⡹", "⡺", "⡻", "⡼", "⡽", "⡾", "⡿", "⢀", "⢁", "⢂", "⢃", "⢄", "⢅", "⢆", "⢇", "⣀", "⣁", "⣂", "⣃", "⣄", "⣅", "⣆", "⣇", "⢈", "⢉", "⢊", "⢋", "⢌", "⢍", "⢎", "⢏", "⣈", "⣉", "⣊", "⣋", "⣌", "⣍", "⣎", "⣏", "⢐", "⢑", "⢒", "⢓", "⢔", "⢕", "⢖", "⢗", "⣐", "⣑", "⣒", "⣓", "⣔", "⣕", "⣖", "⣗", "⢘", "⢙", "⢚", "⢛", "⢜", "⢝", "⢞", "⢟", "⣘", "⣙", "⣚", "⣛", "⣜", "⣝", "⣞", "⣟", "⢠", "⢡", "⢢", "⢣", "⢤", "⢥", "⢦", "⢧", "⣠", "⣡", "⣢", "⣣", "⣤", "⣥", "⣦", "⣧", "⢨", "⢩", "⢪", "⢫", "⢬", "⢭", "⢮", "⢯", "⣨", "⣩", "⣪", "⣫", "⣬", "⣭", "⣮", "⣯", "⢰", "⢱", "⢲", "⢳", "⢴", "⢵", "⢶", "⢷", "⣰", "⣱", "⣲", "⣳", "⣴", "⣵", "⣶", "⣷", "⢸", "⢹", "⢺", "⢻", "⢼", "⢽", "⢾", "⢿", "⣸", "⣹", "⣺", "⣻", "⣼", "⣽", "⣾", "⣿", }, Interval: 80 * time.Millisecond, } Dots9 = Style{ Frames: []string{"⢹", "⢺", "⢼", "⣸", "⣇", "⡧", "⡗", "⡏"}, Interval: 80 * time.Millisecond, } DotsCircle = Style{ Frames: []string{"⢎ ", "⠎⠁", "⠊⠑", "⠈⠱", " ⡱", "⢀⡰", "⢄⡠", "⢆⡀"}, Interval: 80 * time.Millisecond, } Dqpb = Style{ Frames: []string{"d", "q", "p", "b"}, Interval: 100 * time.Millisecond, } DwarfFortress = Style{ Frames: []string{ " ██████£££ ", "☺██████£££ ", "☺██████£££ ", "☺▓█████£££ ", "☺▓█████£££ ", "☺▒█████£££ ", "☺▒█████£££ ", "☺░█████£££ ", "☺░█████£££ ", "☺ █████£££ ", " ☺█████£££ ", " ☺█████£££ ", " ☺▓████£££ ", " ☺▓████£££ ", " ☺▒████£££ ", " ☺▒████£££ ", " ☺░████£££ ", " ☺░████£££ ", " ☺ ████£££ ", " ☺████£££ ", " ☺████£££ ", " ☺▓███£££ ", " ☺▓███£££ ", " ☺▒███£££ ", " ☺▒███£££ ", " ☺░███£££ ", " ☺░███£££ ", " ☺ ███£££ ", " ☺███£££ ", " ☺███£££ ", " ☺▓██£££ ", " ☺▓██£££ ", " ☺▒██£££ ", " ☺▒██£££ ", " ☺░██£££ ", " ☺░██£££ ", " ☺ ██£££ ", " ☺██£££ ", " ☺██£££ ", " ☺▓█£££ ", " ☺▓█£££ ", " ☺▒█£££ ", " ☺▒█£££ ", " ☺░█£££ ", " ☺░█£££ ", " ☺ █£££ ", " ☺█£££ ", " ☺█£££ ", " ☺▓£££ ", " ☺▓£££ ", " ☺▒£££ ", " ☺▒£££ ", " ☺░£££ ", " ☺░£££ ", " ☺ £££ ", " ☺£££ ", " ☺£££ ", " ☺▓££ ", " ☺▓££ ", " ☺▒££ ", " ☺▒££ ", " ☺░££ ", " ☺░££ ", " ☺ ££ ", " ☺££ ", " ☺££ ", " ☺▓£ ", " ☺▓£ ", " ☺▒£ ", " ☺▒£ ", " ☺░£ ", " ☺░£ ", " ☺ £ ", " ☺£ ", " ☺£ ", " ☺▓ ", " ☺▓ ", " ☺▒ ", " ☺▒ ", " ☺░ ", " ☺░ ", " ☺ ", " ☺ &", " ☺ ☼&", " ☺ ☼ &", " ☺☼ &", " ☺☼ & ", " ‼ & ", " ☺ & ", " ‼ & ", " ☺ & ", " ‼ & ", " ☺ & ", "‼ & ", " & ", " & ", " & ░ ", " & ▒ ", " & ▓ ", " & £ ", " & ░£ ", " & ▒£ ", " & ▓£ ", " & ££ ", " & ░££ ", " & ▒££ ", "& ▓££ ", "& £££ ", " ░£££ ", " ▒£££ ", " ▓£££ ", " █£££ ", " ░█£££ ", " ▒█£££ ", " ▓█£££ ", " ██£££ ", " ░██£££ ", " ▒██£££ ", " ▓██£££ ", " ███£££ ", " ░███£££ ", " ▒███£££ ", " ▓███£££ ", " ████£££ ", " ░████£££ ", " ▒████£££ ", " ▓████£££ ", " █████£££ ", " ░█████£££ ", " ▒█████£££ ", " ▓█████£££ ", " ██████£££ ", " ██████£££ ", }, Interval: 80 * time.Millisecond, } Ellipsis = Style{ Frames: []string{"", ".", "..", "..."}, Interval: 333 * time.Millisecond, } FingerDance = Style{ Frames: []string{"🤘 ", "🤟 ", "🖖 ", "✋ ", "🤚 ", "👆 "}, Interval: 160 * time.Millisecond, } Fish = Style{ Frames: []string{ "~~~~~~~~~~~~~~~~~~~~", "> ~~~~~~~~~~~~~~~~~~", "º> ~~~~~~~~~~~~~~~~~", "(º> ~~~~~~~~~~~~~~~~", "((º> ~~~~~~~~~~~~~~~", "<((º> ~~~~~~~~~~~~~~", "><((º> ~~~~~~~~~~~~~", " ><((º> ~~~~~~~~~~~~", "~ ><((º> ~~~~~~~~~~~", "~~ <>((º> ~~~~~~~~~~", "~~~ ><((º> ~~~~~~~~~", "~~~~ <>((º> ~~~~~~~~", "~~~~~ ><((º> ~~~~~~~", "~~~~~~ <>((º> ~~~~~~", "~~~~~~~ ><((º> ~~~~~", "~~~~~~~~ <>((º> ~~~~", "~~~~~~~~~ ><((º> ~~~", "~~~~~~~~~~ <>((º> ~~", "~~~~~~~~~~~ ><((º> ~", "~~~~~~~~~~~~ <>((º> ", "~~~~~~~~~~~~~ ><((º>", "~~~~~~~~~~~~~~ <>((º", "~~~~~~~~~~~~~~~ ><((", "~~~~~~~~~~~~~~~~ <>(", "~~~~~~~~~~~~~~~~~ ><", "~~~~~~~~~~~~~~~~~~ <", "~~~~~~~~~~~~~~~~~~~~", }, Interval: 80 * time.Millisecond, } FistBump = Style{ Frames: []string{ "🤜\u3000\u3000\u3000\u3000🤛 ", "🤜\u3000\u3000\u3000\u3000🤛 ", "🤜\u3000\u3000\u3000\u3000🤛 ", "\u3000🤜\u3000\u3000🤛\u3000 ", "\u3000\u3000🤜🤛\u3000\u3000 ", "\u3000🤜✨🤛\u3000\u3000 ", "🤜\u3000✨\u3000🤛\u3000 ", }, Interval: 80 * time.Millisecond, } Flip = Style{ Frames: []string{ "_", "_", "_", "-", "`", "`", "'", "´", "-", "_", "_", "_", }, Interval: 70 * time.Millisecond, } Globe = Style{ Frames: []string{"🌍", "🌎", "🌏"}, Interval: 250 * time.Millisecond, } Grenade = Style{ Frames: []string{ "، ", "′ ", " ´ ", " ‾ ", " ⸌", " ⸊", " |", " ⁎", " ⁕", " ෴ ", " ⁓", " ", " ", " ", }, Interval: 80 * time.Millisecond, } GrowHorizontal = Style{ Frames: []string{ "▏", "▎", "▍", "▌", "▋", "▊", "▉", "▊", "▋", "▌", "▍", "▎", }, Interval: 120 * time.Millisecond, } GrowVertical = Style{ Frames: []string{"▁", "▃", "▄", "▅", "▆", "▇", "▆", "▅", "▄", "▃"}, Interval: 120 * time.Millisecond, } Hamburger = Style{ Frames: []string{"☱", "☲", "☴", "☲"}, Interval: 333 * time.Millisecond, } Jump = Style{ Frames: []string{"⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"}, Interval: 100 * time.Millisecond, } Layer = Style{ Frames: []string{"-", "=", "≡"}, Interval: 150 * time.Millisecond, } Line = Style{ Frames: []string{"|", "/", "-", "\\"}, Interval: 100 * time.Millisecond, } Line2 = Style{ Frames: []string{"⠂", "-", "–", "-", "–", "-"}, Interval: 100 * time.Millisecond, } Material = Style{ Frames: []string{ "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "███████▁▁▁▁▁▁▁▁▁▁▁▁▁", "████████▁▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "██████████▁▁▁▁▁▁▁▁▁▁", "███████████▁▁▁▁▁▁▁▁▁", "█████████████▁▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁▁██████████████▁▁▁▁", "▁▁▁██████████████▁▁▁", "▁▁▁▁█████████████▁▁▁", "▁▁▁▁██████████████▁▁", "▁▁▁▁██████████████▁▁", "▁▁▁▁▁██████████████▁", "▁▁▁▁▁██████████████▁", "▁▁▁▁▁██████████████▁", "▁▁▁▁▁▁██████████████", "▁▁▁▁▁▁██████████████", "▁▁▁▁▁▁▁█████████████", "▁▁▁▁▁▁▁█████████████", "▁▁▁▁▁▁▁▁████████████", "▁▁▁▁▁▁▁▁████████████", "▁▁▁▁▁▁▁▁▁███████████", "▁▁▁▁▁▁▁▁▁███████████", "▁▁▁▁▁▁▁▁▁▁██████████", "▁▁▁▁▁▁▁▁▁▁██████████", "▁▁▁▁▁▁▁▁▁▁▁▁████████", "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "██████▁▁▁▁▁▁▁▁▁▁▁▁▁█", "████████▁▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "███████████▁▁▁▁▁▁▁▁▁", "████████████▁▁▁▁▁▁▁▁", "████████████▁▁▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁▁▁█████████████▁▁▁▁", "▁▁▁▁▁████████████▁▁▁", "▁▁▁▁▁████████████▁▁▁", "▁▁▁▁▁▁███████████▁▁▁", "▁▁▁▁▁▁▁▁█████████▁▁▁", "▁▁▁▁▁▁▁▁█████████▁▁▁", "▁▁▁▁▁▁▁▁▁█████████▁▁", "▁▁▁▁▁▁▁▁▁█████████▁▁", "▁▁▁▁▁▁▁▁▁▁█████████▁", "▁▁▁▁▁▁▁▁▁▁▁████████▁", "▁▁▁▁▁▁▁▁▁▁▁████████▁", "▁▁▁▁▁▁▁▁▁▁▁▁███████▁", "▁▁▁▁▁▁▁▁▁▁▁▁███████▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", }, Interval: 17 * time.Millisecond, } Meter = Style{ Frames: []string{"▱▱▱", "▰▱▱", "▰▰▱", "▰▰▰", "▰▰▱", "▰▱▱", "▱▱▱"}, Interval: 143 * time.Millisecond, } Mindblown = Style{ Frames: []string{ "😐 ", "😐 ", "😮 ", "😮 ", "😦 ", "😦 ", "😧 ", "😧 ", "🤯 ", "💥 ", "✨ ", "\u3000 ", "\u3000 ", "\u3000 ", }, Interval: 160 * time.Millisecond, } MiniDot = Style{ Frames: []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}, Interval: 83 * time.Millisecond, } Monkey = Style{ Frames: []string{"🙈", "🙉", "🙊"}, Interval: 333 * time.Millisecond, } Moon = Style{ Frames: []string{"🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘"}, Interval: 125 * time.Millisecond, } Noise = Style{ Frames: []string{"▓", "▒", "░"}, Interval: 100 * time.Millisecond, } OrangeBluePulse = Style{ Frames: []string{"🔸 ", "🔶 ", "🟠 ", "🟠 ", "🔶 ", "🔹 ", "🔷 ", "🔵 ", "🔵 ", "🔷 "}, Interval: 100 * time.Millisecond, } OrangePulse = Style{ Frames: []string{"🔸 ", "🔶 ", "🟠 ", "🟠 ", "🔶 "}, Interval: 100 * time.Millisecond, } Pipe = Style{ Frames: []string{"┤", "┘", "┴", "└", "├", "┌", "┬", "┐"}, Interval: 100 * time.Millisecond, } Point = Style{ Frames: []string{"∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"}, Interval: 125 * time.Millisecond, } Points = Style{ Frames: []string{"∙∙∙", "●∙∙", "∙●∙", "∙∙●"}, Interval: 143 * time.Millisecond, } Pong = Style{ Frames: []string{ "▐⠂ ▌", "▐⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂▌", "▐ ⠠▌", "▐ ⡀▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐ ⠠ ▌", "▐ ⠂ ▌", "▐ ⠈ ▌", "▐ ⠂ ▌", "▐ ⠠ ▌", "▐ ⡀ ▌", "▐⠠ ▌", }, Interval: 80 * time.Millisecond, } Pulse = Style{ Frames: []string{"█", "▓", "▒", "░"}, Interval: 125 * time.Millisecond, } RollingLine = Style{ Frames: []string{"/ ", " - ", " \\ ", " |", " |", " \\ ", " - ", "/ "}, Interval: 80 * time.Millisecond, } Runner = Style{ Frames: []string{"🚶 ", "🏃 "}, Interval: 140 * time.Millisecond, } Sand = Style{ Frames: []string{ "⠁", "⠂", "⠄", "⡀", "⡈", "⡐", "⡠", "⣀", "⣁", "⣂", "⣄", "⣌", "⣔", "⣤", "⣥", "⣦", "⣮", "⣶", "⣷", "⣿", "⡿", "⠿", "⢟", "⠟", "⡛", "⠛", "⠫", "⢋", "⠋", "⠍", "⡉", "⠉", "⠑", "⠡", "⢁", }, Interval: 80 * time.Millisecond, } Shark = Style{ Frames: []string{ "▐|\\____________▌", "▐_|\\___________▌", "▐__|\\__________▌", "▐___|\\_________▌", "▐____|\\________▌", "▐_____|\\_______▌", "▐______|\\______▌", "▐_______|\\_____▌", "▐________|\\____▌", "▐_________|\\___▌", "▐__________|\\__▌", "▐___________|\\_▌", "▐____________|\\▌", "▐____________/|▌", "▐___________/|_▌", "▐__________/|__▌", "▐_________/|___▌", "▐________/|____▌", "▐_______/|_____▌", "▐______/|______▌", "▐_____/|_______▌", "▐____/|________▌", "▐___/|_________▌", "▐__/|__________▌", "▐_/|___________▌", "▐/|____________▌", }, Interval: 120 * time.Millisecond, } SimpleDots = Style{ Frames: []string{". ", ".. ", "...", " "}, Interval: 400 * time.Millisecond, } SimpleDotsScrolling = Style{ Frames: []string{". ", ".. ", "...", " ..", " .", " "}, Interval: 200 * time.Millisecond, } Smiley = Style{ Frames: []string{"😄 ", "😝 "}, Interval: 200 * time.Millisecond, } SoccerHeader = Style{ Frames: []string{ " 🧑⚽️ 🧑 ", "🧑 ⚽️ 🧑 ", "🧑 ⚽️ 🧑 ", "🧑 ⚽️ 🧑 ", "🧑 ⚽️ 🧑 ", "🧑 ⚽️ 🧑 ", "🧑 ⚽️🧑 ", "🧑 ⚽️ 🧑 ", "🧑 ⚽️ 🧑 ", "🧑 ⚽️ 🧑 ", "🧑 ⚽️ 🧑 ", "🧑 ⚽️ 🧑 ", }, Interval: 80 * time.Millisecond, } Speaker = Style{ Frames: []string{"🔈 ", "🔉 ", "🔊 ", "🔉 "}, Interval: 160 * time.Millisecond, } SquareCorners = Style{ Frames: []string{"◰", "◳", "◲", "◱"}, Interval: 180 * time.Millisecond, } Squish = Style{ Frames: []string{"╫", "╪"}, Interval: 100 * time.Millisecond, } Stars = Style{ Frames: []string{ "·", "✢", "✳", "✶", "✻", "✽", "✽", "✻", "✶", "✳", "✢", "·", }, Interval: 120 * time.Millisecond, } TimeTravel = Style{ Frames: []string{ "🕛 ", "🕚 ", "🕙 ", "🕘 ", "🕗 ", "🕖 ", "🕕 ", "🕔 ", "🕓 ", "🕒 ", "🕑 ", "🕐 ", }, Interval: 100 * time.Millisecond, } Toggle = Style{ Frames: []string{"⊶", "⊷"}, Interval: 250 * time.Millisecond, } Toggle10 = Style{ Frames: []string{"㊂", "㊀", "㊁"}, Interval: 100 * time.Millisecond, } Toggle11 = Style{ Frames: []string{"⧇", "⧆"}, Interval: 50 * time.Millisecond, } Toggle12 = Style{ Frames: []string{"☗", "☖"}, Interval: 120 * time.Millisecond, } Toggle13 = Style{ Frames: []string{"=", "*", "-"}, Interval: 80 * time.Millisecond, } Toggle2 = Style{ Frames: []string{"▫", "▪"}, Interval: 80 * time.Millisecond, } Toggle3 = Style{ Frames: []string{"□", "■"}, Interval: 120 * time.Millisecond, } Toggle4 = Style{ Frames: []string{"■", "□", "▪", "▫"}, Interval: 100 * time.Millisecond, } Toggle5 = Style{ Frames: []string{"▮", "▯"}, Interval: 100 * time.Millisecond, } Toggle6 = Style{ Frames: []string{"ဝ", "၀"}, Interval: 300 * time.Millisecond, } Toggle7 = Style{ Frames: []string{"⦾", "⦿"}, Interval: 80 * time.Millisecond, } Toggle8 = Style{ Frames: []string{"◍", "◌"}, Interval: 100 * time.Millisecond, } Toggle9 = Style{ Frames: []string{"◉", "◎"}, Interval: 100 * time.Millisecond, } Triangle = Style{ Frames: []string{"◢", "◣", "◤", "◥"}, Interval: 50 * time.Millisecond, } Weather = Style{ Frames: []string{ "☀️ ", "☀️ ", "☀️ ", "🌤 ", "⛅️ ", "🌥 ", "☁️ ", "🌧 ", "🌨 ", "🌧 ", "🌨 ", "🌧 ", "🌨 ", "⛈ ", "🌨 ", "🌧 ", "🌨 ", "☁️ ", "🌥 ", "⛅️ ", "🌤 ", "☀️ ", "☀️ ", }, Interval: 100 * time.Millisecond, } )
Predefined spinner frame sets adapted from https://github.com/sindresorhus/cli-spinners Pass any of these to WithStyle or the animation builder's Style method to change the animation.
Functions ¶
func BoomerangFrames ¶
BoomerangFrames expands frames into a ping-pong sequence. [a, b, c] becomes [a, b, c, b]. Styles with fewer than 3 frames are returned unchanged because there is nothing to bounce.
Types ¶
type Option ¶
type Option func(*Style)
Option configures a spinner constructor.
func WithBoomerang ¶
func WithBoomerang() Option
WithBoomerang enables ping-pong playback so the animation smoothly reverses at each end instead of jumping from the last frame back to the first. Can be combined with WithStyle (applied after) or used standalone.
func WithFrames ¶
WithFrames sets the animation frames. Values <= 0 are a no-op (keep existing Frames).
func WithInterval ¶
WithInterval overrides the frame duration of the current style. Values <= 0 are a no-op (keep existing Interval).
func WithReverse ¶
func WithReverse() Option
WithReverse enables reverse playback of the spinner frames. Can be combined with WithStyle (applied after) or used standalone.
type Style ¶
Style is a set of frames used in animating the spinner. Set Reverse to true to play the frames in reverse order. Set Boomerang to true to play the frames in a ping-pong loop so the animation smoothly reverses at each end instead of jumping from the last frame back to the first. For example, frames [a, b, c] play as [a, b, c, b, a, b, c, ...]. Boomerang and Reverse can be combined.
func ApplyOptions ¶
ApplyOptions applies the given options to the default style and returns the result.
func DefaultStyle ¶
func DefaultStyle() Style
DefaultStyle returns the default spinner Style. It uses Moon in reverse.