Aptivi - Manual
ProjectsWebsiteBlog
Terminaux - Manual
Terminaux - Manual
  • Welcome!
  • Breaking changes
    • API v1.0
    • API v2.0
    • API v3.0
    • API v4.0
    • API v5.0
    • API v6.0
    • API v7.0
  • Usage
    • Preface
    • Console Tools
      • Console Checker
        • Console Size Requirements
      • Image Rendering
        • Icons
      • Console Writers
        • Individual Writers
        • Cyclic Writers
          • Geometric Shapes
          • Charts
          • Text
          • Artistic
          • Progress Bars
          • Lists and Calendars
          • Miscellaneous
        • Informational Boxes
      • Textual UI
        • Interactive TUI
        • Console Screen
        • Console Resize Listener
        • VT Sequences
      • Console Wrapper
      • Console Colors
      • Color Templates
      • Presentation System
      • Console Extensions
      • Nerd Fonts
      • Terminal Info
      • Test Fixtures
      • Terminal Structures
      • Console Logging
    • Input Reader
      • Shells
        • Shell Structure
          • Help System
          • Command Parsing
          • Command Information
          • Command Switches
          • Shell Presets
          • Command Aliasing
      • Other Input
        • Keybindings
        • Choice-based inputs
        • Editors and Viewers
        • Figlet Font Selector
        • Color Wheel
        • Spinner Selector
      • Reader State
      • Reader Settings
      • Syntax Highlighting
      • Pointer Events
    • Color Sequences
      • Color Model Conversions
      • Color Model Parsing
      • Interop with System.Drawing.Color
  • Report an issue
  • Source code
  • API Reference
Powered by GitBook
On this page
Edit on GitHub
  1. Usage
  2. Input Reader
  3. Other Input

Spinner Selector

Spin, spin, spin!

Last updated 5 months ago

Terminaux provides a selector that allows you to choose a spinner in an interactive way with live previews, powered by the feature. This feature can be found in the SpinnerSelector class found in the Terminaux.Inputs.Styles namespace, and you can run it with the following functions:

  • PromptForSpinner()

  • PromptForSpinner(string spinner)

The first overload automatically falls back to the Dots built-in spinner, while the second overload allows you to specify the name of a built-in spinner. You can get a list of built-in spinner names defined in the BuiltinSpinners class.

You can't use custom spinners, as they are not considered to be built-in.

Controls

The below keybindings can be used to control the selector:

Keybinding
Action

Left arrow (wheel up)

Previous spinner

Right arrow (wheel down)

Next spinner

Enter

Submits your selection

Escape

Cancels your selection and returns the initial spinner

H

Help page

S

Select a spinner from the list

Shift + S

Select a spinner by writing its name

Once the user end submitted their selection, the two functions will return a Spinner instance obtained from the built-in spinner instance list, which can be rendered immediately using a function described .

here
textual UI