gluestack-ui logo
Get Updates
Prompt to React Native UI
Home
Components
Hooks
Apps
MCP Server
Guides
Home
Overview
IntroductionQuick Start
Getting Started
InstallationTooling SetupVS Code ExtensionsFigma UI KitCLIgluestack-ui-nativewind-utils
Core Concepts
AccessibilityUniversal
Performance
Benchmarks
Theme Configuration
Default TokensCustomizing ThemeDark Mode
Components
All Components
Typography
HeadingrscTextrsc
Layout
BoxrscCenterrscDividerHStackrscVStackrscGridalpha, rsc
Feedback
AlertProgressSpinnerToast
Data Display
BadgeCardrscTablealpha
Forms
ButtonCheckboxFormControlInputLinkPressableRadioSelectSliderSwitchTextarea
Overlay
AlertDialogDrawerMenuModalPopoverPortalTooltip
Disclosure
ActionsheetAccordionBottomSheetalpha
Media And Icons
AvatarImageIconrsc
Others
FabSkeletonalpha, rsc
Hooks
useBreakPointValue
useMediaQuery
Apps
Dashboard App
Kitchensink App
Todo App
Starter Kit
MCP Server
MCP Server
Guides
Recipes
LinearGradient
Tutorials
Building Ecommerce App
More
Upgrade to v2Upgrade to v3FAQsReleasesRoadmapTroubleshootingDiscord FAQs

Table

Effortlessly manage tabular data with gluestack-ui Table component. A fully customizable React Native table component for smooth data display in your UI. Perfect for any project! This is an illustration of Table component.

Installation

Run the following command:

npx gluestack-ui add table

API Reference

To use this component in your project, include the following import statement in your file.
import {
  Table,
  TableHeader,
  TableFooter,
  TableBody,
  TableHead,
  TableData,
  TableRow,
  TableCaption,
} from '@/components/ui/table';
anatomy-imageanatomy-image
export default () => (
  <Table>
    <TableHeader>
      <TableRow>
        <TableHead />
      </TableRow>
    </TableHeader>
    <TableBody>
      <TableRow>
        <TableData />
      </TableRow>
    </TableBody>
    <TableFooter>
      <TableRow>
        <TableData />
      </TableRow>
    </TableFooter>
    <TableCaption />
  </Table>
);

Component Props

This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.

Table

It inherits all the properties of of @expo/html-elements's Table on native and html table tag on web.

TableHeader

It inherits all the properties of of @expo/html-elements's THead on native and html thead tag on web.

TableRow

It inherits all the properties of of @expo/html-elements's TR on native and html tr tag on web.

TableData

It inherits all the properties of React Native's Text component on native and html td tag on web.
PropTypeDefault
PropTypeDefault
useRNView
booleanIf true renders a react-native view component instead of a text component.

TableHead

It inherits all the properties of React Native's Text component on native and html th tag on web.
PropTypeDefault
useRNView
booleanIf true renders a react-native view component instead of a text component.
booleanIf true renders a react-native view component instead of a text component.

TableBody

It inherits all the properties of of @expo/html-elements's TBody on native and html tbody tag on web.

TableFooter

It inherits all the properties of of @expo/html-elements's TFoot on native and html tfoot tag on web.

TableCaption

It inherits all the properties of of @expo/html-elements's Caption on native and html caption tag on web.

Examples

The Examples section provides visual representations of the different variants of the component, allowing you to quickly and easily determine which one best fits your needs. Simply copy the code and integrate it into your project.

Table with caption

This is an example of a Table component with a caption.

Stripped table

This example demonstrates a table with a striped background.

Table with other components

This example illustrates a table component with a badge component.

Table with top and side header

This example illustrates a table component with a top and a side header.
Edit this page on GitHub
Go backCard
Up nextButton
Go backCard
Up nextButton