Documentation Index
Fetch the complete documentation index at: https://araf.badr.co.id/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Table is used to display structured data in rows and columns. The component is composed of Cell elements that can be freely combined — each column can use a different cell style depending on the type of data being displayed.Installation
Usage
Header
The header row usesType=Header with two background style options.
- White Header
- Gray Header
White background (
#FFFFFF), used for tables with light contrast.| Token | Value |
|---|---|
| Background | #FFFFFF |
| Text | #667085 |
| Font | Inter Medium 12px |
| Border bottom | 1px solid #EAECF0 |
Cell Styles
Each content cell (Type=Default) can use various styles depending on the type of data it displays.
Lead Cells
Cells with interactive elements (checkbox/toggle) and an optional avatar, icon, or payment logo on the left side.Content Cells
Cells for displaying data in various visual formats.- Badge
- Trend
- Progress Bar
- Avatar Group
- Star Ratings
One or more badge labels. Suitable for Status, Category, or Tag columns.
Badge (single)
● ActiveBadges multiple
DesignFrontendAction Cells
Cells for displaying action controls at the far right of a row.Standalone Cells
Cells containing only a single interactive element with no accompanying text.Checkbox only
Toggle only
Cell States
Each cell supports three interaction states.- Default
- Hover
- Disabled
Normal state with no interaction. Cell background is transparent (white from the table).
Properties
Each cell has 4 boolean properties that can be combined.| Property | Type | Default | Description |
|---|---|---|---|
checkbox | boolean | false | Displays a checkbox on the left side of the cell |
toggle | boolean | false | Displays a toggle button on the left side of the cell |
supportingText | boolean | false | Displays small supporting text below the main text |
trailingIcon | boolean | false | Displays a sort/dropdown icon in the header (only for Type=Header) |
checkbox and toggle are mutually exclusive — they cannot be enabled simultaneously in the same cell.Design Tokens
Table
| Token | Value |
|---|---|
| Border | 1px solid #B9B9B9 |
| Border radius | 4px |
| Row divider | 1px solid #EAECF0 |
Cell
| Element | Token | Value |
|---|---|---|
| Padding | horizontal | 24px |
| Padding | vertical | 16px |
| Row height (Header) | — | 52px |
| Row height (Default) | — | 72px |
| Primary text | color | #101828 (Gray/900) |
| Supporting text | color | #667085 (Gray/500) |
| Primary text | font | Inter Medium 14px |
| Supporting text | font | Inter Regular 14px |
| Header text | font | Inter Medium 12px |
| Header bg (White) | — | #FFFFFF |
| Header bg (Gray) | — | #F9FAFB |
| Hover row bg | — | #F9FAFB |
API Reference
Table
Additional class for the table wrapper.
Shows the outer table border.
TableCell
Cell type —
header for the header row, default for content rows.style
"lead-checkbox" | "lead-toggle" | "lead-avatar-checkbox" | "lead-avatar-toggle" | "lead-icon-checkbox" | "lead-icon-toggle" | "badge" | "badges-multiple" | "trend-positive" | "trend-negative" | "progress-bar" | "avatar-group" | "action-buttons" | "action-icons" | "action-dropdown-icon" | "checkbox-only" | "toggle-only" | "star-ratings" | "lead-payment-checkbox" | "lead-payment-toggle" | "white-header" | "gray-header"
required
The cell’s visual style, which determines its content and layout.
The cell’s interaction state.
Displays a checkbox on the left side of the cell.
Displays a toggle button on the left side of the cell.
Displays supporting text below the main text.
Displays a sort icon on the header cell.
Enables sort functionality on the header cell.
The value to display (trend, progress, star ratings).
The percentage change for the
trend-positive / trend-negative type.Accessibility
- Use semantic
<table>,<thead>,<tbody>,<tr>,<th>,<td>elements - Header cells use
<th scope="col">for clear column relationships - The “select all” checkbox in the header uses
aria-label="Select all rows" - Tables with sorting add
aria-sort="ascending" | "descending" | "none"to the header - Long tables use a descriptive
aria-labelor<caption> - Ensure the table can scroll horizontally on narrow viewports with
overflow-x: auto - Action buttons within cells use an
aria-labelthat includes the row name (e.g.aria-label="Edit Iqbal Maulana")
Do’s & Don’ts
Do
- Use consistent cell styles for each column
- Limit the number of columns to prevent overflow on small screens
- Use the Gray Header for tables with many rows to improve readability
- Always include an action column at the far right
- Use
supportingTextto show secondary information without adding extra columns - Provide an
aria-labelon every action button
Don't
- Don’t mix
checkboxandtogglein the same table - Don’t use more than 2 badges in a single
badges-multiplecell - Don’t place action buttons in any column other than the last one
- Don’t render a table without a header
- Don’t use overly long text in a cell — truncate with an ellipsis if necessary
- Don’t use the
progress-barstyle for non-percentage values