# GaugeProgress A gauge/dial progress component for displaying metrics like scores, performance indicators, or completion status. SVG-based with 270° and 180° arc types. ## Installation ```bash deno run -A jsr:@lockness/ui add gaugeprogress ``` ## Usage ```tsx import { GaugeProgress } from '@lockness/ui/components' // Basic gauge (270°) // With label // Half circle gauge (180°) // Different variants ``` ## Gauge Types ### Full Gauge (270°) The default gauge type displays a 270° arc. ```tsx ``` ### Half Circle (180°) A semicircle gauge for a different visual style. ```tsx ``` ## Variants | Variant | Description | | ------------- | --------------------------------- | | `default` | Primary color | | `success` | Teal color for positive states | | `warning` | Yellow color for warning states | | `destructive` | Red color for error/danger states | ```tsx ``` ## Sizes | Size | Dimension | | --------- | --------- | | `sm` | 5rem | | `default` | 8rem | | `lg` | 10rem | | `xl` | 12rem | ```tsx ``` ## Stroke Width Customize the thickness of the progress arc. ```tsx ``` ### Independent Track Width Set a different stroke width for the background track. ```tsx ``` ## Stroke Line Cap ### Round (default) Rounded stroke ends. ```tsx ``` ### Butt Flat/square stroke ends. ```tsx ``` ## Custom Colors Override the variant colors with custom Tailwind classes. ```tsx ``` ## Props | Prop | Type | Default | Description | | ---------------- | ---------------------------------------------- | --------- | ------------------------------------------- | | value | `number` | `0` | Current progress value (0-100) | | max | `number` | `100` | Maximum value | | type | `gauge \| half` | `gauge` | Gauge type: 270° arc or 180° half circle | | variant | `default \| success \| warning \| destructive` | `default` | Visual style variant | | size | `sm \| default \| lg \| xl` | `default` | Size of the gauge | | strokeWidth | `number` | `1.5` | Stroke width of the progress arc | | trackStrokeWidth | `number` | - | Stroke width of the background track | | strokeLinecap | `round \| butt \| square` | `round` | Shape of the stroke ends | | progressColor | `string` | - | Custom color class for the progress arc | | trackColor | `string` | - | Custom color class for the background track | | showLabel | `boolean` | `true` | Show the value label in the center | | label | `string` | - | Custom label to display below the value | | class | `string` | - | Additional CSS class names | | id | `string` | - | Element id attribute | ## Accessibility The component includes proper ARIA attributes: - `role="meter"` for semantic meaning - `aria-valuenow` for the current value - `aria-valuemin` and `aria-valuemax` for the range - `aria-label` for screen reader description ## Examples ### Dashboard Metrics ```tsx
``` ### Speed Indicator ```tsx ``` ### Score Display ```tsx ```