Skip to main content

DashboardContent

The padded, width-capped container the routed content sits in inside the dashboard shell.

Use it for a page you add next to the generated ones — a report, a settings screen — so it lines up with the generated views instead of running to the window edges.

Example​

import {DashboardContent} from 'habarico';

const SalesReportPage = () => (
<DashboardContent maxWidth="lg">
<SalesReport />
</DashboardContent>
);

Props​

It extends MUI's ContainerProps, so component, className and the rest are available too.

NameTypeDefaultDescription
children (required)ReactNode—Page content
maxWidth'xs' | 'sm' | 'md' | 'lg' | 'xl' | false'xl'Caps the content width; false removes the cap
disablePaddingbooleanfalseDrops the container padding at every breakpoint
sxSxProps<Theme>—MUI style override

The user's page width setting overrides an uncapped container: with maxWidth={false} and the setting on centered, the content is still capped at xl. SchemaAdmin feeds its contentMaxWidth prop in here.

See also​