Skip to main content

Table

Table component from Scaffald UI component library.

Import​

import { Table } from '@scaffald/ui';

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Text>Table renders data in rows and columns. See the props documentation below for the full column/row configuration API.</Text>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

Common Props​

All Table components accept standard React Native View props.

Variants​

See component props for available variants.

Examples​

Advanced Usage​

// Example implementation
<Table variant="default">
Example content
</Table>

Headless Hook (useTable)​

For complete control over data grids, virtualization, and sorting logic, use the useTable hook. It handles complex SaaS table interactions (filtering, selecting, expanding) entirely independent of the view layer.

import { useTable } from '@scaffald/ui';

function CustomDataGrid({ data, columns }) {
const table = useTable({
data,
columns,
pageSize: 50,
});

return (
<View>
{/* Build your own virtualized grid here using table.displayData */}
</View>
);
}

Accessibility​

  • Keyboard navigation support
  • Screen reader compatible
  • ARIA attributes included
  • Focus management

Design Tokens​

This component uses the following design tokens:

  • Colors: colors.{semantic}.{theme}.{variant}
  • Spacing: spacing.*
  • Typography: typography.*

See Design Tokens for more information.

No related components.

Changelog​

See GitHub Releases for version history.