Componentes/Tabela de Cotações

Tabela de Cotações

Tabela de cotações em tempo real. Exibe ativo, último preço, variação % com código de cor (verde/vermelho), tendência (seta), quantidade e dados de oferta/demanda.

Trading
Figma: 77:3681

Preview

Painel de Cotações
AtivoÚltimoQ ÚltVar %TendDifStat...QOfcOfcOfvQOfvTeórico
ITUB450.47100-0.72%arrow_drop_down0.36.1.00050.4750.491.300.
IBOV84.204,78.+1.10%arrow_drop_up987.55......
GGBR416,10100-1.83%arrow_drop_down0.29.4.40016,1016,113.800.
PETR331,75150-0.95%arrow_drop_down0.30.3.20031,7531,802.500.
VALE392,00200+1.20%arrow_drop_up0.50.2.70092,0092,104.000.
ABEV315,25120-0.80%arrow_drop_down0.25.5.00015,2515,301.800.
USIM58,9090-1.00%arrow_drop_down0.18.2.5008,908,952.100.

Código

Copie e cole no Claude Code para implementar este componente em pixel-perfect usando os tokens TRDR.

<!-- Tabela de Cotações TRDR (Figma: 77:3681) -->
<div style="width:100%;overflow-x:auto;background:var(--bg-primary)">
  <table class="trdr-tabela-cotacoes">
    <colgroup>
      <col style="width:65px"> <col style="width:80px"> <col style="width:65px">
      <col style="width:65px"> <col style="width:65px"> <col style="width:65px">
      <col style="width:65px"> <col style="width:65px"> <col style="width:65px">
      <col style="width:65px"> <col style="width:65px"> <col style="width:65px">
    </colgroup>
    <thead>
      <tr>
        <th>Ativo</th><th>Último</th><th>Q Últ</th><th>Var %</th>
        <th>Tend</th><th>Dif</th><th>Stat...</th><th>QOfc</th>
        <th>Ofc</th><th>Ofv</th><th>QOfv</th><th>Teórico</th>
      </tr>
    </thead>
    <tbody>
      <tr class="trdr-tabela-cotacoes-row-selected">
        <td>ITUB4</td>
        <td class="col-ultimo">50.47</td>
        <td>100</td>
        <td class="col-var-down">-0.72%</td>
        <td><span class="col-tend-icon col-tend-down">arrow_drop_down</span></td>
        <td>0.36</td><td>.</td><td>1.000</td>
        <td>50.47</td><td>50.49</td><td>1.300</td><td>.</td>
      </tr>
      <tr>
        <td>VALE3</td>
        <td class="col-ultimo">92,00</td>
        <td>200</td>
        <td class="col-var-up">+1.20%</td>
        <td><span class="col-tend-icon col-tend-up">arrow_drop_up</span></td>
        <td>0.50</td><td>.</td><td>2.700</td>
        <td>92,00</td><td>92,10</td><td>4.000</td><td>.</td>
      </tr>
    </tbody>
  </table>
</div>

Dimensões

VarianteLarguraAltura
Largura total800px
Altura do header32px
Altura da linha32px
Célula Último80px32px

Props / Variantes

PropTipoValores
rowsCotacaoRow[]
array de dados de cotação

Tokens Utilizados

PropriedadeTokenValor
Var% positivocontext.trading.up
#4FE290
Var% negativocontext.trading.down
#F34F45
Cell Último bgsurface.primary
#4A4A4A
Row alternada
rgba(255,255,255,0.08)
Row hoversurface.secondary
#222222
Header borderborder.default
#4A4A4A
Header textcontent.tertiary
#A4A4A4
Cell textcontent.primary
#FFFFFF

Anatomia

Tabela (table-layout: fixed, border-collapse: collapse):
  [thead > tr (32px, border-bottom 1px --border-default)]
    [th: 14px/400 --content-tertiary | padding: 4px 8px]
    Colunas: Ativo(65) Último(80) Q Últ(65) Var%(65) Tend(65) Dif(65) Stat(65) QOfc(65) Ofc(65) Ofv(65) QOfv(65) Teórico(65)
  [tbody > tr (32px, cursor pointer)]
    [tr:nth-child(even): bg rgba(255,255,255,0.08)]
    [tr:hover: bg --surface-secondary]
    [tr.selected: bg --bg-secondary]
    [td: 14px/400 --content-primary | padding: 4px 8px]
    [td.col-ultimo: bg --surface-primary #4A4A4A]
    [td.col-var-up: color --context-trading-up #4FE290]
    [td.col-var-down: color --context-trading-down #F34F45]
    [td.col-tend: ícone Material Symbols arrow_drop_up/down]