Anatomy of a React component
My vision for how every React component should look
421
8 min.
The SSF-A standard defines requirements for the semantics, accessibility, and behavior of favicons.
The favicon must be compatible with various platforms and devices (iOS, Android, desktop browsers), display correctly in light and dark themes, and load quickly with the correct MIME type.
The color coding corresponds to the file structure diagram.
{
"background_color": "#000000",
"description": "Site description",
"display": "standalone",
"name": "Site name",
"start_url": "/",
"short_name": "Short name",
"theme_color": "#ffffff",
"lang": "en",
"dir": "ltr",
"icons": [
{
"src": "/favicons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/favicons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}import type { Metadata } from 'next';
const metadata: Metadata = {
icons: {
icon: [
{
url: '/favicon.ico',
sizes: '48x48',
type: 'image/x-icon',
},
{
url: '/favicons/icon.svg',
sizes: 'any',
type: 'image/svg+xml',
},
],
apple: [
{
url: '/favicons/apple-touch-icon.png',
sizes: '180x180',
type: 'image/png',
},
],
},
manifest: '/manifest.webmanifest',
};
export { metadata };flowchart TD
A[/public/] --> B(favicon.ico)
A --> C(manifest.webmanifest)
A --> D[/favicons/]
D --> E[icon.svg]
D --> F[apple-touch-icon.png]
D --> G[android-chrome-192x192.png]
D --> H[android-chrome-512x512.png]
classDef root fill:#000,stroke:#333,stroke-width:1px,color:#fff;
classDef ios fill:#eee,stroke:#333,stroke-width:1px,color:#000;
classDef android fill:#0f0,stroke:#333,stroke-width:1px,color:#000;
classDef svg fill:#f80,stroke:#333,stroke-width:1px,color:#000;
classDef manifest fill:#ff9,stroke:#333,stroke-width:1px,color:#000;
class A root;
class B root;
class C manifest;
class D root;
class E svg;
class F ios;
class G android;
class H android;Color coding:
- Black - root files;
- Yellow - manifest;
- Orange - SVG icon;
- Gray - iOS;
- Green - Android.
The favicon should be recognizable and support color themes:
<svg xmlns="http://www.w3.org/2000/svg">
<style>
.logo { fill: #000; } /* Light theme */
@media (prefers-color-scheme: dark) {
.logo { fill: #fff; } /* Dark theme */
}
</style>
<path class="logo" d="..."/>
</svg>The favicon must be scalable to display correctly on devices with different pixel densities and must have a PWA configuration to display the site as a standalone app, including a splash screen and a color theme for UI elements.
My vision for how every React component should look
421
8 min.
The SST standard defines requirements for the semantics, accessibility, and logic of tabs
62
7 min.
The SSF-U standard defines requirements for the semantics, accessibility, and logic of fullscreen
248
2 min.
The SSA standard defines requirements for the semantics, accessibility, and logic of accordion
258
2 min.
An Analysis of Critical Web Design Mistakes. Why Sliders, Autoplay, and Slow-Loading Pages Reduce Conversion Rates and Rankings on Google
232
2 min.
The SSP standard defines requirements for the semantics, accessibility, and logic of pagination
240
1 min.