Typography typographymetricscode
Monospace Metrics
Technical line for displaying raw metrics or logs.
Preview
Monospace Metrics
Usage
Copy the full block below to use this component with its imports.
astro
---
import { MonospaceMetrics } from 'astro-component-kit';
---
<MonospaceStatLine>Content</MonospaceStatLine> ---
import { MonospaceMetrics } from 'astro-component-kit';
---
<MonospaceStatLine>Content</MonospaceStatLine> Manual Installation
If you are not using the npm package, create a new file src/components/lib/MonospaceMetrics.astro and paste the following code:
astro
---
---
<div class="mono-stat"><slot /></div>
<style>
.mono-stat { background: #000; color: #00ff00; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; padding: 0.75rem 1.25rem; border-left: 3px solid #00ff00; font-size: 0.8rem; border-radius: 4px; border: 1px solid rgba(0, 255, 0, 0.1); }
</style> ---
---
<div class="mono-stat"><slot /></div>
<style>
.mono-stat { background: #000; color: #00ff00; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; padding: 0.75rem 1.25rem; border-left: 3px solid #00ff00; font-size: 0.8rem; border-radius: 4px; border: 1px solid rgba(0, 255, 0, 0.1); }
</style>
Quick Info
- Category
- Typography
- Filename
MonospaceMetrics.astro- Dependencies
- None — pure Astro + CSS
- Tags
- typographymetricscode