How to use the blessed.textbox function in blessed

To help you get started, we’ve selected a few blessed examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heapwolf / lev / lib / ui / output.js View on Github external
style: {
      bg: 239,
      fg: 'gray',
      scrollbar: {
        inverse: true
      }
    },
    tags: true,
    height: '30%',
    bottom: 2,
    right: 0,
    padding: { top: 1 },
    left: 0
  })

  var textCmd = blessed.textbox({
    parent: screen,
    mouse: true,
    keys: true,
    bg: 239,
    fg: 'white',
    height: 1,
    right: 0,
    left: 0,
    bottom: 1
  })

  output.on('click', function() {
    screen.emit('keypress', ':')
  })

  var bounce
github heapwolf / lev / lib / ui / connections.js View on Github external
formLabelRemote.show()
      textPort.show()
      textHost.show()
      buttonClearManifest.show()
      textManifest.show()
      checkType.uncheck()
    }
    screen.render()
  }

  checkType.on('click', function() {
    toggleType(checkType.checked)
  })

  var textPath = blessed.textbox({
    parent: form,
    mouse: true,
    keys: true,
    bg: 243,
    fg: 'white',
    hoverBg: 'black',
    height: 1,
    left: sidePanelWidth + labelWidth + 1,
    right: 11,
    top: 9,
    hidden: true,
    name: 'text'
  })

  var buttonClearLocal = blessed.button({
    parent: form,
github aviaryan / chattt / ui / input.js View on Github external
const blessed = require('blessed');
const colors = require('./../lib/solarized.js');

let input = blessed.textbox({
	bottom: 0,
	height: 3,
	style: {
		bg: colors.base02,
		fg: colors.base1
	},
	padding: {
		top: 1,
		left: 2
	}
});

let self = {
	input: input,
	screen: null,
	focus: () => {
github jhotmann / node-rename-cli / lib / ui.js View on Github external
}
});

let inputBox = blessed.form({
  parent: screen,
  label: 'command',
  top: 0,
  left: 0,
  width: '70%',
  height: 3,
  content: 'rename ',
  border: {type: 'line'},
  cursor: 'line'
});

let commandInput = blessed.textbox({
  parent: inputBox,
  grabKeys: true,
  heigh: 1,
  left: 7,
  name: 'command'
});

let infoBox = blessed.box({
  parent: screen,
  top: 0,
  left: '70%',
  width: '30%',
  height: screen.height - 3,
  border: {type: 'line'},
  scrollable: true,
  label: 'info'
github goferito / termllo / lib / ui.js View on Github external
},
    border: {
      type: 'line',
    },
    style: {
      label: {
        fg: 'green',
        left: 'center',
        bold: true,
      },
      border: {
        fg: 'green',
      },
    },
  })
  const titleBox = blessed.textbox({
    parent: cardForm,
    name: 'name',
    height: 3,
    keys: true,
    vi: true,
    inputOnFocus: true,
    border: {
      type: 'line',
    },
    label: ` Title `,
    style: {
      label: {
        fg: 'green',
      },
      border: {
        fg: 'green',
github astefanutti / kubebox / lib / ui / login.js View on Github external
height       : 1,
    width        : 30,
    left         : 15,
    censor       : true,
    bottom       : 3,
  });

  blessed.text({
    parent  : form,
    left    : 1,
    bottom  : 2,
    align   : 'left',
    content : 'Token       :',
  }); 

  const token = blessed.textbox({
    parent       : form,
    name         : 'token',
    inputOnFocus : true,
    mouse        : true,
    keys         : true,
    height       : 1,
    width        : 33,
    left         : 15,
    bottom       : 2,
  });

  if (os.platform() === 'browser' && kube_config) {
    const config = blessed.button({
      parent  : form,
      mouse   : true,
      keys    : true,
github goto-bus-stop / dizzay / dizzay-ui / src / ui.js View on Github external
height: '100%-2',
    top: 0,
    right: 0,
    scrollable: true,
    scrollback: 512,
    alwaysScroll: false,
    tags: true,
    mouse: true,
    keys: true,
    style: {
      bg: 'purple',
      fg: 'white'
    }
  })

  const chatBox = blessed.textbox({
    width: '30%',
    height: 1,
    bottom: 0,
    right: 0,
    mouse: true,
    keys: true
  })

  const videoContainer = blessed.box({
    width: '70%',
    height: '100%',
    top: 0,
    left: 0,
    style: { bg: 'black' }
  })
  const header = blessed.text({
github evanyeung / terminal-slack / userInterface.js View on Github external
function searchChannels(searchCallback) {
      const searchBoxTitle = blessed.text({
        width: '90%',
        left: '5%',
        align: 'left',
        content: '{bold}Search{/bold}',
        tags: true,
      });
      const searchBox = blessed.textbox({
        width: '90%',
        height: 'shrink',
        left: '5%',
        top: '5%',
        keys: true,
        vi: true,
        inputOnFocus: true,
        border: {
          fg: '#cc6666',
          type: 'line',
        },
      });
      function removeSearchBox() {
        mainWindow.remove(searchBox);
        mainWindow.remove(searchBoxTitle);
        mainWindow.append(mainWindowTitle);
github heapwolf / lev / lib / ui / connections.js View on Github external
var textKeyEncoding = blessed.textbox({
    parent: form,
    mouse: true,
    keys: true,
    bg: 243,
    fg: 'white',
    hoverBg: 'black',
    height: 1,
    left: sidePanelWidth + labelWidth + 1,
    width: 10,
    top: 5,
    value: 'utf8'
  })

  var textValueEncoding = blessed.textbox({
    parent: form,
    mouse: true,
    keys: true,
    bg: 243,
    fg: 'white',
    hoverBg: 'black',
    height: 1,
    left: sidePanelWidth + labelWidth + 30,
    width: 10,
    top: 5,
    value: 'json'
  })

  function toggleType(local) {
    if (local) {
      textPath.show()