RV
Reed Vogt

File Display with Toggle Functionality

Generate a file display component with the following features: Hide/Show Toggle: Include a button with a left chevron icon aligned at the start of the row. The button toggles between a "show" and "hide" state. Show State: In the "show" state, display each file within a box that has an outline and padding. Inside each box, display the file's icon, determined by the file type, in a horizontal row. Hide State: In the "hide" state, align all file items at the start of the row (flex start). Arrange the files in a cascading manner with a left margin of 2px between each file, causing them to overlap slightly. Ensure the component is responsive, and the layout adapts to different screen sizes.

Prompt
Component Preview

About

Create a dynamic file display component in React using Tailwind CSS that allows users to toggle between detailed and compact views with smooth responsiveness and stylish overlapping file icons.

Share

Last updated 1 month ago