Skip to content
Inkoxide

Search covers every page and heading of the docs. Use ↑ ↓ and ↵.

Tables

Edit this page

The code on this page is React’s. How Vue writes it
ReactVue
ClassesclassName="p-4"class="p-4"
PropsheaderRows={1}:header-rows="1" or :headerRows="1"
A prop that is truehyphenatehyphenate
Content per pagerender={({ pageNumber }) => …}<template #render="{ pageNumber, totalPages }">…</template>
The page, deeper downusePage()usePage() (it injects the page)
What to render<Invoice invoice={invoice} />h(Invoice, { invoice })
A template for generateTemplate: ComponentType<{ data }>Template: a component with the prop data

The rest, and Vue’s own API, is in the Vue guide.

The code on this page is React’s. How Svelte writes it
ReactSvelte
ClassesclassName="p-4"class="p-4" (a list or an object of flags too)
Content per pagerender={({ pageNumber }) => …}{#snippet render(page)}{page.pageNumber}{/snippet} inside the Text or View
The page, deeper downusePage()usePage(), while the component is created
What to render<Invoice invoice={invoice} />{ component: Invoice, props: { invoice } }
A template for generateTemplate: ComponentType<{ data }>Template: a component with the prop data

The rest, and Svelte’s own API, is in the Svelte guide.

The code on this page is React’s. How Angular writes it
ReactAngular
Components<View>, <Path>, <TextField><ink-view>, <ink-path>, <ink-text-field>: ink- and the name in kebab case
ClassesclassName="p-4"class="p-4", [class]="…"
PropsheaderRows={1}, size="A4"[headerRows]="1", size="A4" (an attribute is a string: bind numbers)
A prop that is truehyphenatehyphenate
Stylestyle={{ padding: 20 }}[style]="{ padding: 20 }"; [inkStyle] for @media blocks and lists of styles
Content per pagerender={({ pageNumber }) => …}[render]="footer" with <ng-template #footer let-page>{{ page.pageNumber }}</ng-template>
The page, deeper downusePage()injectPage()
What to render<Invoice invoice={invoice} />{ component: Invoice, inputs: { invoice } }
A template for generateTemplate: ComponentType<{ data }>Template: a component with the input data

The rest, and Angular’s own API, is in the Angular guide.

<Table columns={['1fr', 50, 80]} headerRows={1} className="w-full">
  <Row className="bg-gray-50 font-bold">
    <Cell className="p-2">Item</Cell>
    <Cell className="p-2 text-right">Qty</Cell>
    <Cell className="p-2 text-right">Amount</Cell>
  </Row>
  {items.map((it) => (
    <Row key={it.id}>
      <Cell className="border-b border-gray-200 p-2">{it.name}</Cell>
      <Cell className="border-b border-gray-200 p-2 text-right">{it.qty}</Cell>
      <Cell className="border-b border-gray-200 p-2 text-right">{it.amount}</Cell>
    </Row>
  ))}
</Table>
  • Columns. Widths are fractions ('1fr'), points, or 'auto': as wide as its content, narrowed toward its longest word when the room runs short.
  • Borders. Adjacent cell borders merge into one by default (borderCollapse: 'collapse'): the wider wins. With borderCollapse: 'separate' (border-separate), each cell draws its own borders, background and radius, borderSpacing (border-spacing-*) apart and from the table's edge. Both go on the Table.
  • Pagination. Header rows repeat on every page, unless they are as tall as the page. Rows split across pages, and a row taller than a page splits inside its cells.
  • Cells. colSpan, rowSpan and verticalAlign are available on Cell. The columns set a cell's width, and a cell's height and minHeight are minimums: the row grows to fit the content. Styles that place or size the cell itself (width, minWidth, maxWidth, margin, position, flexGrow, …) or apply an effect to it (opacity, rotate, transform, …) are errors on a Cell; put them on a View inside it.

Synced from packages/react/GUIDE.md in the inkoxide repository.