Example coverage
Docs migration
82%
Target: 109 routes
89 examples
82%
Generated from source-first examples
A widget for tracking progress towards a specific goal or target.
82%
Target: 109 routes
89 examples
82%
Generated from source-first examples
"use client";
import { GoalWidget } from '@photonix/ultimate';
export default function GoalWidgetBasicExample() {
return (
<GoalWidget
title="Example coverage"
subtitle="Docs migration"
value={82}
currentLabel="89 examples"
targetLabel="109 routes"
progressLabel="82%"
color="brand"
footer="Generated from source-first examples"
/>
);
}Prop | Type | Default | Description |
|---|---|---|---|
title | string | - | |
subtitle | string | - | |
value | number | - | |
currentLabel | string | - | |
targetLabel | string | - | |
progressLabel | string | - | |
actions | React.ReactNode | - | |
loading | boolean | false | Loading state |
appearance | WidgetAppearance | 'outlined' | Widget appearance |
padding | string | number | - | Widget padding (default: 16px) |
style | React.CSSProperties | - | Custom style |
className | string | - | Custom class name |
footer | React.ReactNode | - | |
color | "primary" | "mint" | "purple" | "brand" | "success" | "error" | "warning" | - |
Standard tracking with title, progress bar, and labels.
65%
Target: 1,000 Sales
Current
65%
"use client";
import { Box, GoalWidget } from '@photonix/ultimate';
export default function GoalWidgetStandardExample() {
return (
<Box w="100%">
<GoalWidget title="Sales Target" value={65} targetLabel="1,000 Sales" />
</Box>
);
}Displays a skeleton preview while data is being fetched.
"use client";
import { Box, GoalWidget } from '@photonix/ultimate';
export default function GoalWidgetLoadingExample() {
return (
<Box w="100%">
<GoalWidget title="Annual Target" loading value={0} />
</Box>
);
}Add extra information or actions using the footer prop.
Phase 2 of 5
8 tasks remaining across 3 teams
"use client";
import { Box, GoalWidget } from '@photonix/ultimate';
export default function GoalWidgetFooterExample() {
return (
<Box w="100%">
<GoalWidget title="Project Completion" value={42} progressLabel="Phase 2 of 5" footer="8 tasks remaining across 3 teams" />
</Box>
);
}