The properties for the MainAspectComponent.
Optional
deprecatedLegacyContext: anyThe rendered MainAspectComponent with adaptive dimensions.
Optional
propUsed to declare the types of the props accepted by the component. These types will be checked during rendering and in development only.
We recommend using TypeScript instead of checking prop types at runtime.
Optional
contextOptional
defaultUsed to define default values for the props accepted by the component.
Optional
displayUsed in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.
MainAspectComponent is a React functional component that dynamically adjusts its dimensions based on window size and specified fractions, while updating screen size states (wide, medium, small) based on container width.
This component provides an adaptive container that resizes according to the window’s height and width, factoring in control visibility, and offers real-time updates for screen size breakpoints.
Component
Example