@atlaskit/table
TypeScript icon, indicating that this package has built-in type declarations

0.9.2 • Public • Published

Table

WARNING!

This is an experimental package for exploration and validation of the foundations for the Atlassian Design System.

Description

A table is used to display and organise complex data.

Usage

import Table from '@atlaskit/table';

Detailed docs and example usage can be found here.

Render Prop

import '@atlaskit/css-reset';
import Table, { Row, Cell, TBody, THead, HeadCell } from '@atlaskit/table';

import { presidents } from './data';

type President = (typeof presidents)[number];

/**
 * Primary UI component for user interaction
 */
export const RenderProp = ({ isSelectable }) => {
	return (
		<Table isSelectable={isSelectable}>
			<THead>
				<HeadCell>Name</HeadCell>
				<HeadCell>Party</HeadCell>
				<HeadCell>Year</HeadCell>
			</THead>
			<TBody<President> rows={presidents}>
				{(row) => (
					<Row key={row.id} {...row}>
						<Cell>{row.nm}</Cell>
						<Cell>{row.pp}</Cell>
						<Cell>{row.tm}</Cell>
					</Row>
				)}
			</TBody>
		</Table>
	);
};

Composition

import '@atlaskit/css-reset';
import Table, { Row, Cell, TBody, THead, HeadCell } from '@atlaskit/table';

import { presidents } from './data';

/**
 * Primary UI component for user interaction
 */
export const CompositionExample = ({ isSelectable }) => {
	return (
		<Table isSelectable={isSelectable}>
			<THead>
				<HeadCell>Name</HeadCell>
				<HeadCell>Party</HeadCell>
				<HeadCell>Year</HeadCell>
			</THead>
			<TBody>
				{presidents.map((row) => (
					<Row key={row.id}>
						<Cell>{row.nm}</Cell>
						<Cell>{row.pp}</Cell>
						<Cell>{row.tm}</Cell>
					</Row>
				))}
			</TBody>
		</Table>
	);
};

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.9.244latest
0.4.22next

Version History

VersionDownloads (Last 7 Days)Published
0.9.244
0.9.129
0.9.01
0.8.60
0.8.51
0.8.41
0.8.30
0.8.21
0.8.10
0.8.00
0.7.21
0.7.10
0.7.00
0.6.100
0.6.90
0.6.81
0.6.70
0.6.61
0.6.40
0.6.31
0.6.22
0.6.10
0.6.01
0.5.22
0.5.133
0.5.02
0.4.3028
0.4.291
0.4.282
0.4.279
0.4.261
0.4.251
0.4.241
0.4.231
0.4.222
0.4.211
0.4.202
0.4.192
0.4.1810
0.4.176
0.4.161
0.4.152
0.4.142
0.4.132
0.4.122
0.4.112
0.4.101
0.4.91
0.4.82
0.4.72
0.4.621
0.4.51
0.4.41
0.4.31
0.4.22
0.4.12
0.4.02
0.3.48
0.3.31
0.3.22
0.3.11
0.3.01
0.2.81
0.2.71
0.2.61
0.2.52
0.2.42
0.2.3329
0.2.21
0.2.12
0.2.01
0.1.411
0.1.31
0.1.22
0.1.11
0.1.01

Package Sidebar

Install

npm i @atlaskit/table

Weekly Downloads

443

Version

0.9.2

License

Apache-2.0

Unpacked Size

190 kB

Total Files

166

Last publish

Collaborators

  • atlassianartifactteam
  • atlaskit-user