From the course: Next.js Ecommerce: Build a Shopping Platform from Scratch

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

ShadCN UI table

ShadCN UI table

All right, guys, so we're still working in the cart table file, and what we're going to do now is install the table component from ShadCN. So down in the terminal, let's say npx ShadCN at latest add and table. Now there's a few things that we need to bring in from that. So up at the top here, we might as well just import those real quick. So I'll say import, and this is going to be from at slash components slash UI slash table. And what we want to bring in is the table component itself. We want to bring in the table body. We want table head, table header, and table row. I think that's everything we need. table cell, so table cell, bring that in, okay, and then we'll come down here and where we have the text of table, get rid of that and replace it with the table component. Inside that we're then going to have the table header, and then inside that we'll have the first table row, and this is going to be where the headings are, so let's do the first heading, So table head and in that…

Contents