মূল বিষয়ে যান
বিভাগসমূহ
Fiesta

data-table

উপস্থাপন যে ছোট ছোট শব্দভান্ডার দিয়ে একটি পর্দা গড়া হয়: অবস্থা, পরিচয়, অগ্রগতি, ডেটা টেবিল আর চার্ট, আর সতর্কবার্তার একমাত্র রূপ।

মানুষ যে সংখ্যাগুলো তুলনা করে, তার জন্য একটি নেটিভ টেবিল। টেবিলটি স্ক্রিনের চেয়ে চওড়া হলে তার কার্ড পাশে স্ক্রল করে, তাই ফোনেও প্রতিটি কলাম থাকে আর সারির শিরোনামগুলো শুরুতে আটকে থাকে। কোনো কলামকে সাজানোর যোগ্য করতে, তার শিরোনামকে সেই কলাম অনুযায়ী সাজানো তালিকার সঙ্গে লিঙ্ক করুন।

প্রতিটি উদাহরণ সত্যিই চলে, কিন্তু এর লিংকগুলো কোথাও নিয়ে যায় না। HTML কপি করার জন্য মার্কআপ দেখায়।

একটি সংখ্যা অনুযায়ী সাজানো

প্রিভিউ
<div rst-box-head>
  <h2 id="sales-h">সপ্তাহ অনুযায়ী বিক্রি</h2>
</div>
<div rst-card rst-table-scroll tabindex="0" role="region" aria-labelledby="sales-h">
  <table rst-table aria-labelledby="sales-h">
    <thead>
      <tr>
        <th scope="col">সপ্তাহ</th>
        <th scope="col" rst-num aria-sort="descending">
          <a href="/sales?sort=sold&amp;dir=asc">বিক্রীত<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></a>
        </th>
        <th scope="col" rst-num>
          <a href="/sales?sort=target&amp;dir=desc">লক্ষ্য<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></a>
        </th>
        <th scope="col" rst-num>ফেরত</th>
        <th scope="col" rst-num>আয়</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <th scope="row">3</th>
        <td rst-num>260</td>
        <td rst-num>600</td>
        <td rst-num>5</td>
        <td rst-num>€6,240</td>
      </tr>
      <tr>
        <th scope="row">4</th>
        <td rst-num>240</td>
        <td rst-num>600</td>
        <td rst-num>1</td>
        <td rst-num>€5,760</td>
      </tr>
      <tr>
        <th scope="row">2</th>
        <td rst-num>180</td>
        <td rst-num>600</td>
        <td rst-num>0</td>
        <td rst-num>€4,320</td>
      </tr>
      <tr>
        <th scope="row">1</th>
        <td rst-num>120</td>
        <td rst-num>600</td>
        <td rst-num>2</td>
        <td rst-num>€2,880</td>
      </tr>
    </tbody>
    <tfoot>
      <tr>
        <th scope="row">মোট</th>
        <td rst-num>800</td>
        <td rst-num>2,400</td>
        <td rst-num>8</td>
        <td rst-num>€19,200</td>
      </tr>
    </tfoot>
  </table>
</div>

একটি অ্যাপে এটি /sales?sort=sold&dir=asc, /sales?sort=target&dir=desc-এ পৌঁছাত। এখানে এর লিঙ্ক আর ফর্ম কোথাও যায় না।

ঘন, স্থির শিরোনামসহ

rst-table-scroll="bounded" উচ্চতা সীমিত রাখে, আর সারিগুলো নিচে স্ক্রল করার সময় শিরোনামের সারিটি জায়গায় থাকে।

প্রিভিউ
<div rst-box-head>
  <h2 id="sales-h">সপ্তাহ অনুযায়ী বিক্রি</h2>
</div>
<div rst-card rst-table-scroll="bounded" tabindex="0" role="region" aria-labelledby="sales-h">
  <table rst-table="dense" aria-labelledby="sales-h">
    <thead>
      <tr>
        <th scope="col">সপ্তাহ</th>
        <th scope="col" rst-num>বিক্রীত</th>
        <th scope="col" rst-num>লক্ষ্য</th>
        <th scope="col" rst-num>ফেরত</th>
        <th scope="col" rst-num>আয়</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <th scope="row">1</th>
        <td rst-num>120</td>
        <td rst-num>600</td>
        <td rst-num>2</td>
        <td rst-num>€2,880</td>
      </tr>
      <tr>
        <th scope="row">2</th>
        <td rst-num>180</td>
        <td rst-num>600</td>
        <td rst-num>0</td>
        <td rst-num>€4,320</td>
      </tr>
      <tr>
        <th scope="row">3</th>
        <td rst-num>260</td>
        <td rst-num>600</td>
        <td rst-num>5</td>
        <td rst-num>€6,240</td>
      </tr>
      <tr>
        <th scope="row">4</th>
        <td rst-num>240</td>
        <td rst-num>600</td>
        <td rst-num>1</td>
        <td rst-num>€5,760</td>
      </tr>
      <tr>
        <th scope="row">5</th>
        <td rst-num>390</td>
        <td rst-num>600</td>
        <td rst-num>3</td>
        <td rst-num>€9,360</td>
      </tr>
      <tr>
        <th scope="row">6</th>
        <td rst-num>610</td>
        <td rst-num>600</td>
        <td rst-num>4</td>
        <td rst-num>€14,640</td>
      </tr>
      <tr>
        <th scope="row">7</th>
        <td rst-num>650</td>
        <td rst-num>600</td>
        <td rst-num>0</td>
        <td rst-num>€15,600</td>
      </tr>
      <tr>
        <th scope="row">8</th>
        <td rst-num>690</td>
        <td rst-num>600</td>
        <td rst-num>2</td>
        <td rst-num>€16,560</td>
      </tr>
    </tbody>
  </table>
</div>

কোনো সারি মেলেনি

কোনো সারি না মিললে শিরোনামের সারিটি জায়গায় থাকে আর একটি ঘর বলে যে কিছুই মেলেনি। খালি অবস্থা সেই টেবিলের জন্য, যাতে কখনও কোনো সারি ছিল না।

প্রিভিউ
<div rst-box-head>
  <h2 id="sales-h">সপ্তাহ অনুযায়ী বিক্রি</h2>
</div>
<div rst-card rst-table-scroll tabindex="0" role="region" aria-labelledby="sales-h">
  <table rst-table aria-labelledby="sales-h">
    <thead>
      <tr>
        <th scope="col">সপ্তাহ</th>
        <th scope="col" rst-num>বিক্রীত</th>
        <th scope="col" rst-num>লক্ষ্য</th>
        <th scope="col" rst-num>ফেরত</th>
        <th scope="col" rst-num>আয়</th>
      </tr>
    </thead>
    <tbody>
      <tr rst-table-empty>
        <td colspan="5">কোনো সপ্তাহ মেলেনি। <a href="/sales">ছাঁকনি মুছুন</a></td>
      </tr>
    </tbody>
  </table>
</div>

একটি অ্যাপে এটি /sales-এ পৌঁছাত। এখানে এর লিঙ্ক আর ফর্ম কোথাও যায় না।