Performance best practices
Keep icons cheap to download and render.
Practices
- Import icons by name; never with
import * as. - Render icons on the server where you can: there they add no client JavaScript.
- Prefer CSS (
color,size-*,stroke-*) over per-icon props for app-wide changes. - For long lists of icons, virtualise the list instead of rendering thousands of SVGs at once. The explorer renders only the visible rows.
- Use the full-colour
Iconcomponent only for the brand registry.
Something wrong or missing?Open an issue