Presets
Built-in Presets
PS Guard includes built-in presets with optimized thresholds for common use cases. Use them with the --preset flag or the preset config option.
nextjs
Balanced thresholds for Next.js applications with SSR/SSG. Based on Google's recommended Web Vitals targets.
| Metric | Threshold |
|---|---|
| LCP | 2500ms |
| CLS | 0.1 |
| INP | 200ms |
| TTFB | 800ms |
| FCP | 1800ms |
| Min Score | 90 |
| Device | mobile |
bash
npx ps-guard --url https://my-nextjs-app.com --preset nextjslanding-page
Stricter thresholds for landing pages where first impression and conversion matter. Optimized for fast paint and minimal layout shift.
| Metric | Threshold |
|---|---|
| LCP | 1800ms |
| CLS | 0.05 |
| INP | 100ms |
| TTFB | 500ms |
| FCP | 1200ms |
| Min Score | 95 |
| Device | mobile |
bash
npx ps-guard --url https://my-landing.com --preset landing-pagemarketing-site
Standard thresholds for marketing sites with images, animations, and dynamic content. More lenient than landing pages.
| Metric | Threshold |
|---|---|
| LCP | 2500ms |
| CLS | 0.1 |
| INP | 200ms |
| TTFB | 800ms |
| FCP | 1800ms |
| Min Score | 85 |
| Device | mobile |
Extending Presets
Presets can be combined with custom config. Your config values override the preset:
typescript
// ps-guard.config.tsexport default { preset: "nextjs",
// Override just the LCP threshold thresholds: { lcp: 3000, // More lenient for image-heavy pages },
// Override device device: "desktop",};Presets provide sensible defaults. Start with a preset and adjust individual thresholds based on your application's needs.