Anatomy of a React component
My vision for how every React component should look
98
8 min.
32
2 min.
The SSF-U standard defines requirements for the semantics, accessibility, and logic of fullscreen.
For the HTML file to function correctly, the viewport meta tag with the values width=device-width, initial-scale=1.0, viewport-fit=cover is required.
The content utilizes the entire physical screen area, including the areas below the “notch” and the Home system indicator, containers and panels must scale correctly to fit the entire screen without cropping important content.
The primary unit of measurement, dvb, helps recalculate the available space when browser panels appear or disappear:
.fullscreen { min-block-size: 100dvb; /* dynamic height */ }
On modern smartphones, the bottom part of the screen is reserved for the system gesture bar env(safe-area-inset-bottom), which prevents the app from accidentally closing when the bottom buttons are pressed:
.bottom-action-panel { padding-block-end: calc(var(--safe-offset) + env(safe-area-inset-bottom)); }
This informs the user that content is present below the fold; the variable is used to ensure the icon always remains above the panel:
.scroll-indicator { inset-block-end: calc(5px + env(safe-area-inset-bottom)); inset-inline-start: 50%; transform: translateX(-50%); }
To prevent rubberband scrolling, you can use the following code:
.main-screen { overscroll-behavior-block: none; }
:root { --safe-offset: 16px; /* default padding for buttons and icons */ } .fullscreen { min-block-size: 100dvb; display: flex; flex-direction: column; overscroll-behavior-block: none; } .bottom-action-panel { position: fixed; inset-block-end: 0; inline-size: 100%; padding-block-end: calc(var(--safe-offset) + env(safe-area-inset-bottom)); background-color: #ffffff; } .scroll-indicator { position: absolute; inset-block-end: calc(5px + env(safe-area-inset-bottom)); inset-inline-start: 50%; transform: translateX(-50%); }
My vision for how every React component should look
98
8 min.
The SSA standard defines requirements for the semantics, accessibility, and logic of accordion
46
2 min.
An Analysis of Critical Web Design Mistakes. Why Sliders, Autoplay, and Slow-Loading Pages Reduce Conversion Rates and Rankings on Google and Yandex
44
2 min.
The SSP standard defines requirements for the semantics, accessibility, and logic of pagination
54
1 min.
The SSPS standard defines requirements for the structure and naming of files and folders in a project
164
2 min.
The SSG standard defines requirements for the semantics, accessibility, and logic of Git
47
3 min.