Westy Design Systemv0.5.0
OverviewComponentsExamplesStorybook

Foundations

  • Typography
  • Colors
  • Spacing
  • Radius
  • Shadows
  • Icons

Components

  • Accordion
  • Alert
  • Alert Dialog
  • Aspect Ratio
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • Context Menu
  • Data Table
  • Date Picker
  • Dialog
  • Direction
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kbd
  • Label
  • Menubar
  • Mobile Table
  • Native Select
  • Navigation Menu
  • Pagination
  • Popover
  • Progress
  • Questionnaire
  • Radio Group
  • Resizable
  • Scroll Area
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Spinner
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toggle
  • Toggle Group
  • Tooltip

Chat

  • Attachment
  • Bubble
  • Marker
  • Message
  • Message Scroller

Components

Mobile Table

The DS table adapted to the 360px minimum mobile viewport — one mobile table for every mobile table in the product, so they all look the same.

360 × 800 — transactions that fit and truncate
The frame is 360px wide — the minimum supported mobile viewport — and 800px tall. The table is table-fixed, so the columns share the frame width and every value that does not fit its cell truncates with an ellipsis. Nothing is lost: the accessible name keeps the complete text, and MobileTableCell mirrors a string child into the native title tooltip (hover or long-press a truncated merchant).

Últimas transações

Cartão •••• 4242

Últimas transações do cartão.
DataEstabelecimentoValorStatus
31 outPadaria Pão de Queijo da Vila MadalenaR$ 42,90Confirmado
31 outUber do Brasil Tecnologia Ltda.R$ 78,50Pendente
30 outSupermercado Bom Preço Unidade Jardim PaulistaR$ 231,47Confirmado
29 outFarmácia São João Filial 1042R$ 96,20Confirmado

Hover (or long-press) a truncated cell — the full value is kept as its title.

360 × 800 — minimum supported mobile viewport

import {
  MobileTable,
  MobileTableBody,
  MobileTableCaption,
  MobileTableCell,
  MobileTableHead,
  MobileTableHeader,
  MobileTableRow,
} from "@workspace/ui/components/mobile-table"

<MobileTable>
  <MobileTableCaption>Últimas transações do cartão.</MobileTableCaption>
  <MobileTableHeader>
    <MobileTableRow>
      <MobileTableHead className="w-14">Data</MobileTableHead>
      <MobileTableHead>Estabelecimento</MobileTableHead>
      <MobileTableHead className="w-24 text-end">Valor</MobileTableHead>
      <MobileTableHead className="w-24">Status</MobileTableHead>
    </MobileTableRow>
  </MobileTableHeader>
  <MobileTableBody>
    {transactions.map((transaction) => (
      <MobileTableRow key={transaction.id}>
        <MobileTableCell>{transaction.date}</MobileTableCell>
        <MobileTableCell className="font-medium">
          {transaction.merchant}
        </MobileTableCell>
        <MobileTableCell className="text-end">
          {transaction.amount}
        </MobileTableCell>
        <MobileTableCell>{transaction.status}</MobileTableCell>
      </MobileTableRow>
    ))}
  </MobileTableBody>
</MobileTable>
A table wider than the viewport scrolls inside its own frame
The same table with a min-w-[480px] on MobileTable: the frame scrolls sideways inside itself — max-w-full keeps the frame within its parent and overscroll-x-contain stops the horizontal scroll from chaining into the page. The 360px page around it never stretches.
DataEstabelecimentoCategoriaValorStatus
31 outPadaria Pão de Queijo da Vila MadalenaAlimentaçãoR$ 42,90Confirmado
31 outUber do Brasil Tecnologia Ltda.TransporteR$ 78,50Pendente
30 outSupermercado Bom Preço Unidade Jardim PaulistaMercadoR$ 231,47Confirmado
29 outFarmácia São João Filial 1042SaúdeR$ 96,20Confirmado

min-w-[480px] table — the frame scrolls sideways, the 360px page does not stretch

import {
  MobileTable,
  MobileTableBody,
  MobileTableCell,
  MobileTableHead,
  MobileTableHeader,
  MobileTableRow,
} from "@workspace/ui/components/mobile-table"

<MobileTable className="min-w-[480px]">
  <MobileTableHeader>
    <MobileTableRow>
      <MobileTableHead className="w-16">Data</MobileTableHead>
      <MobileTableHead>Estabelecimento</MobileTableHead>
      <MobileTableHead className="w-24">Categoria</MobileTableHead>
      <MobileTableHead className="w-24 text-end">Valor</MobileTableHead>
      <MobileTableHead className="w-24">Status</MobileTableHead>
    </MobileTableRow>
  </MobileTableHeader>
  <MobileTableBody>
    {transactions.map((transaction) => (
      <MobileTableRow key={transaction.id}>
        <MobileTableCell>{transaction.date}</MobileTableCell>
        <MobileTableCell className="font-medium">
          {transaction.merchant}
        </MobileTableCell>
        <MobileTableCell>{transaction.category}</MobileTableCell>
        <MobileTableCell className="text-end">
          {transaction.amount}
        </MobileTableCell>
        <MobileTableCell>{transaction.status}</MobileTableCell>
      </MobileTableRow>
    ))}
  </MobileTableBody>
</MobileTable>
API Reference
Every part renders its native table element and accepts the matching element props — the same shape as the desktop Table. Only MobileTable adds structure, and only MobileTableCell adds behavior: a string child is mirrored into the native title attribute when no title prop is passed, so the full value of a truncated cell is one hover or long-press away.
PartRenders
MobileTablediv > table
MobileTableHeaderthead
MobileTableBodytbody
MobileTableFootertfoot
MobileTableRowtr
MobileTableHeadth
MobileTableCelltd
MobileTableCaptioncaption

Tokens used

7 design tokens consumed by the Mobile Table component.

  • --muted

    Muted

    bg-muted/50hover:bg-muted/50data-[state=selected]:bg-muted
  • --foreground

    Foreground

    text-foreground
  • --muted-foreground

    Muted Foreground

    text-muted-foreground
  • --border

    Border

    border-bborder-t
  • --text-sm

    Text Small (14px)

    text-sm
  • --font-weight-medium

    Font weight Medium (500)

    font-medium
  • --spacing

    Spacing unit (4px)

    h-10px-2p-2mt-4