ComponentsTableFigma Usage

Figma Usage

Learn how to use the Table components from the Figma library

The component is simple in construction and less complex to use. We provide the basic structures in Figma, while allowing flexibility for each designer to create a table that best fits their project needs.

1. Add and detach the instace

  • Look for the Table component in Assets, or copy and paste it in your file.
  • Select the instance, click on the more options menu, and then choose Detach instance.
💡

Make sure to use the smaller components, such as Columns and Cells, and keep them linked. This way, we ensure consistency across Admin tables.

2. Define the Table Header

Adjust the Header props

PropDescription
checkboxTurn it on when the table has checkboxes for bulk edits.
expandableRowsTurn it on when the table has expandable rows.
menuTurn it on when the table rows have a menu.
💡

The columns for those props should maintain their original width. When configuring column resizing, these should always be fixed.

Table Header Props

Define the number of columns

  • Detach the component.
  • Hide or delete unnecessary columns, or add more columns.
  • Configure the resizing in the most suitable way for responsiveness.
  • Create your Table Header as a local component.
💡

Reuse the existing header structure, maintain a fixed height, and always use the Column components.

Adjust the columns props

PropDescription
rightAlignedTurn it on if it’s a column with numerical content.
sortableDefines if the column is sortable.
contextual helpDefines if there’s a Contextual Help besides the column label.
labelEdits the column label.

Table Columns Props

Create a local component

After creating a local header component, replace it in the Table that is already in your file.

3. Define the Table Row

Adjust the Row props

PropDescription
stateDefines the state of the row.
minHeightDefines the row minimum height.
checkboxTurn it on when the table has checkboxes for bulk edits.
expandableTurn it on when the row expands to show more content.

Expandable variants include a placeholder for content. Create a local component with your content and then replace the placeholder, respecting the paddings already applied. Currently, any content can be included within an expanding row, even another table.

Table Rows Props

Define the number of columns

  • Detach the component.
  • Hide or delete unnecessary columns, or add more columns.
  • Configure the resizing in the same way as the Header, so the columns are aligned.
  • Create your Table Row as a local component.
💡

Reuse the existing row structure, and always use the Cell components.

Define the type of cells

The type of cell depends on the property type that will be displayed. Common property types include:

Property typeContentCell
Name or IDDedicated 1-line Text column.Name
ImageImage of the item. In left-to-right languages, the Image should always be displayed to the left of the Name in a Thumbnail column.Image
Name or ID with Description2-line Text column.Name + Text
Tertiary actionsTertiary Menu.Menu
Secondary actionButton.Button
Bulk ActionsCheckbox.Checkbox
Status or CategoryTag.Tag
Value or PriceNumber.Value
Creation or Update date1-line Text.Text
Country or payment flagIcon.Icon
Type of object1-line Text, with or without an Icon before it.Text or Icon + Text
Percentage value or tendencyDedicated 1-line Number column or in a 2-line Number column along with the numeric value.Trend or Value + Trend
  • Use the existing Cell components whenever possible.
  • The text that best identifies items should use the $text-action typography token. For example, the Name or the ID.
  • Percentage values and tendencies should use semantic colors to visually represent information.
  • Descriptions and IDs (when there is a separate Name column) should use the $fg-soft token.

Custom cells

When none of the provided cell types suit your scenario, create a local custom cell component. Reuse an existing component to replicate spacing and minimum height.

Minimum Height

Cells with 1 line have a min height of 44px by default, and those with 2 lines have 64px by default.

The minimum height of the row always respects the minimum height of the cells, and all rows in the table should have the same minimum height.

Add the rows

The Table component already includes a layer called Rows with auto layout. Replace the rows components that already exist in the Table for your local row component. Delete or add the necessary rows.

Add Rows

Create a local component

Turn your table into a local component in your file to make it easier to replicate and edit.

More

  • Create the hover and select states of the Row using the same color styles as the original component.
  • Create a variant for scroll state of the Header applying the same shadow as the original component. It should be used when the header stays fixed on the top of the page.
  • The Table component includes a layer for columns that stay fixed during horizontal scrolling. Use this model in the prototypes.