Need help with ink-table?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

maticzav
131 Stars 19 Forks 76 Commits 5 Opened issues

Description

📐A table component for Ink.

Services available

!
?

Need anything else?

Contributors list

# 92
netlify
TypeScr...
GraphQL
angular...
35 commits
# 51,740
GraphQL
dao
React
graphql...
18 commits
# 23,407
JavaScr...
nvm
Zsh
node-js
4 commits
# 135,421
CSS
HTML
blockch...
ESLint
3 commits
# 114,492
Zsh
Markdow...
js
Gulp
1 commit
# 8,986
CSS
Git
nextjs
Electro...
1 commit
# 129,454
Node.js
Git
cpluspl...
generat...
1 commit

ink-table

npm version

A table component for Ink.

Install

npm install ink-table

Usage

import Table from 'ink-table'

const data = [ { name: 'Sosa Saunders', gender: 'male', age: 17, email: '[email protected]', phone: '+1 (809) 435-2786', }, { name: 'Angelina Kirk', gender: 'female', age: 3, email: '[email protected]', phone: '+1 (870) 567-3516', }, { name: 'Bradford Rosales', gender: 'male', age: 20, email: '[email protected]', phone: '+1 (918) 573-3240', }, { name: 'Gwen Schroeder', gender: 'female', age: 17, email: '[email protected]', phone: '+1 (987) 417-2062', }, { name: 'Ellison Mann', gender: 'male', age: 5, email: '[email protected]', phone: '+1 (889) 411-2186', }, ]

const Basic = () =>

render()

Documentation

type ScalarDict = {
  [key: string]: string | number | boolean | null | undefined
}

export type TableProps = { /**

  • List of values (rows).
  • / data: T[] /**
  • Columns that we should display in the table.
  • / columns: (keyof T)[] /**
  • Cell padding.
  • / padding: number /**
  • Header component.
  • / header: (props: React.PropsWithChildren) => JSX.Element /**
  • Component used to render a cell in the table.
  • / cell: (props: React.PropsWithChildren) => JSX.Element /**
  • Component used to render the skeleton of the table.
  • / skeleton: (props: React.PropsWithChildren) => JSX.Element }

License

MIT © Matic Zavadlal

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.