DocsGuides

Guides

Full Screen Toggle Guide

How to use, customize, or disable the full screen toggle button feature of Shadcn Table

Relevant Table Options

#
Prop Name
Type
Default Value
More Info Links
1booleantrueST Full Screen Toggle Docs
2OnChangeFn<boolean>ST Full Screen Toggle Docs
3PaperProps | ({ table }} => PaperPropsshadcn/ui Paper API Docs

Relevant State

#
State Option
Type
Default Value
More Info Links
1booleanfalse

Disable Full Screen Toggle

The full screen toggle button is enabled by default. You can hide it by setting the enableFullScreenToggle table option to false.

const table = useShadcnTable({
  columns,
  data,
  enableFullScreenToggle: false,
});

return <ShadcnTable table={table} />;

Change Z-Index of Full Screen Table

Under the hood, when the table is full screen, these classes are applied to the root table container:

fixed inset-0 z-50 h-dvh max-h-dvh w-dvw max-w-dvw rounded-none border-0 m-0 p-0

If you need to change the zIndex of the full screen table, you can do so by passing in a stTableLayoutProps table option with a style object that has a zIndex property (or a z-* Tailwind class in className).

stTableLayoutProps: ({ table }) => ({
  style: {
    zIndex: table.state.isFullScreen ? 1000 : undefined,
  },
});

On this page