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

0.8.3 • 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.4.20next
0.8.371latest

Version History

VersionDownloads (Last 7 Days)Published
0.8.371
0.8.226
0.8.11
0.8.039
0.7.20
0.7.11
0.7.00
0.6.103
0.6.913
0.6.80
0.6.70
0.6.61
0.6.40
0.6.30
0.6.20
0.6.10
0.6.00
0.5.20
0.5.1150
0.5.00
0.4.3017
0.4.290
0.4.280
0.4.2713
0.4.260
0.4.250
0.4.240
0.4.230
0.4.221
0.4.210
0.4.200
0.4.190
0.4.183
0.4.173
0.4.160
0.4.150
0.4.140
0.4.130
0.4.120
0.4.110
0.4.100
0.4.90
0.4.80
0.4.70
0.4.62
0.4.50
0.4.40
0.4.30
0.4.20
0.4.11
0.4.00
0.3.42
0.3.30
0.3.20
0.3.10
0.3.00
0.2.80
0.2.70
0.2.60
0.2.50
0.2.40
0.2.3494
0.2.21
0.2.10
0.2.00
0.1.48
0.1.30
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i @atlaskit/table

Weekly Downloads

850

Version

0.8.3

License

Apache-2.0

Unpacked Size

188 kB

Total Files

166

Last publish

Collaborators

  • atlassianartifactteam
  • atlaskit-user