This project implements a grid-based React component that displays data fetched from a JSON file hosted on Mocky. The grid features interactive row and column headers with highlight functionality.
- Displays data in a grid format with row and column headers
- Fetches data from a provided JSON API response
- Column highlight: Hovering over a column header highlights the entire column
- Row highlight: Hovering over a row header highlights the entire row
- Mutually exclusive highlighting: Row and column highlights do not occur simultaneously
- React
- TypeScript
- Shadcn UI (for Table component)
- TailwindCSS (for styling)
- Clone the repository
- Install dependencies:
npm install
- Start the development server:
npm start
ornpx vite
Import the Grid component into your React application:
import Grid from "./components/Grid";
function App() {
return (
<div className="App">
<Grid />
</div>
);
}