Skip to content
+

File Explorer - Customization

Learn how to customize the File Explorer component.

Basics

Custom icons

Use the collapseIcon slot, the expandIcon slot and the defaultEndIcon prop to customize the File Explorer icons. The demo below shows how to add icons using both an existing icon library, such as Material Icons, and creating an icon from scratch using Material UI's SVG Icon component.

  • History

Custom toggle animations

Use the groupTransition slot on the FileElement to pass a component that handles your animation.

The demo below is animated using Material UI's Collapse component together with the react-spring library.

  • History

Custom styling

Use fileElementClasses to target internal elements of the Tree Item component and change their styles.

  • History
Press Enter to start editing

Custom label

Use the label slot to customize the Tree Item label or to replace it with a custom component.

The slotProps prop allows you to pass props to the label component. The demo below shows how to pass an id attribute to the Tree Item label:

  • History

The slots prop allows you to replace the default label with your own component: The demo below shows how to add a basic edition feature on the Tree Item label:

  • History

Headless API

Use the useFile hook to create your own component. The demo below shows how to add an avatar and custom typography elements.

  • B

    Bailey Monroe

    • F

      Freddie Reed

Common examples

File explorer

The demo below shows many of the previous customization examples brought together to make the File Explorer component look completely different than its default design.

  • File

    Size

    Modified

  • Documents

    566.5 MB

    • Company

      564.4 MB

      • Invoice

        223.4 MB

      • Meeting notes.doc

        222.6 MB

      • Tasks list.doc

        117.7 MB

      • Equipment

        286.5 KB

      • Video conference

        413.5 KB

    • Personal

    • Group photo.jpg

      2.1 MB

  • History

  • Trash

    now

API

See the documentation below for a complete reference to all of the props and classes available to the components mentioned here.