advanced-widgets
БесплатноБез исполняемых скриптовНе проверенTop 0.01% MUI patterns — sparkline grid cells, heatmap DataGrids, real-time WebSocket grids, AI assistant, save/restore grid state, bi-directional chart+grid…
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Advanced MUI Widgets — Top 0.01% Patterns
These patterns transform MUI from a component library into a living application platform.
DataGrid as a Living Application Surface
Sparkline Charts in Grid Cells
Every row becomes a mini dashboard with inline trend visualization.
import { SparkLineChart } from '@mui/x-charts/SparkLineChart';
import type { GridColDef } from '@mui/x-data-grid';
// Custom column type — reuse across multiple columns
const sparklineColumn = (field: string, label: string, plotType: 'line' | 'bar' = 'line'): GridColDef => ({
field,
headerName: label,
width: 180,
sortable: false,
filterable: false,
renderCell: (params) => {
const data = params.value as number[];
if (!data?.length) return null;
const isUp = data[data.length - 1] > data[0];
return (
<SparkLineChart
data={data}
width={160}
height={48}
plotType={plotType}
curve="natural"
showTooltip
showHighlight
area={plotType === 'line'}
colors={[isUp ? '#16a34a' : '#dc2626']}
/>
);
},
});
const columns: GridColDef[] = [
{ field: 'name', headerName: 'Contractor', width: 200 },
sparklineColumn('weeklyTrend', '12-Week Trend', 'line'),
sparklineColumn('weeklyHours', 'Weekly Hours', 'bar'),
{
field: 'utilization',
headerName: 'Utilization',
width: 120,
renderCell: (params) => (
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1, width: '100%' }}>
<Typography variant="body2" fontWeight={600} sx={{ minWidth: 40 }}>
{params.value}%
</Typography>
<LinearProgress
variant="determinate"
value={params.value}
sx={{
flex: 1, height: 8, borderRadius: 4,
bgcolor: 'action.hover',
'& .MuiLinearProgress-bar': {
borderRadius: 4,
bgcolor: params.value > 80 ? 'error.main'
: params.value > 60 ? 'warning.main'
: 'success.main',
},
}}
/>
</Box>
),
},
];
Heatmap Color Scaling
Map numeric values to a continuous color gradient across cells.
function heatmapColor(value: number, min = 0, max = 100): string {
const pct = Math.max(0, Math.min(1, (value - min) / (max - min)));
// Cool → Warm gradient (blue → yellow → red)
if (pct < 0.5) {
const t = pct * 2;
return `rgb(${Math.round(59 + 196 * t)}, ${Math.round(130 + 70 * t)}, ${Math.round(246 - 186 * t)})`;
}
const t = (pct - 0.5) * 2;
return `rgb(${Math.round(255)}, ${Math.round(200 - 140 * t)}, ${Math.round(60 - 60 * t)})`;
}
const heatmapColumn: GridColDef = {
field: 'score',
headerName: 'Score',
width: 100,
renderCell: (params) => (
<Box
sx={{
width: '100%', height: '100%',
display: 'flex', alignItems: 'center', justifyContent: 'center',
bgcolor: heatmapColor(params.value),
color: params.value > 60 ? '#fff' : '#000',
fontWeight: 700, fontSize: '0.875rem',
transition: 'background-color 300ms ease',
}}
>
{params.value}
</Box>
),
};
Real-Time WebSocket Grid
Stream data updates from SignalR/WebSocket → apiRef.updateRows() with flash animation.
function LiveDataGrid({ initialRows, columns }: { initialRows: any[]; columns: GridColDef[] }) {
const apiRef = useGridApiRef();
const flashTimeouts = useRef(new Map<GridRowId, NodeJS.Timeout>());
useEffect(() => {
// Connect to SignalR hub or WebSocket
const connection = new signalR.HubConnectionBuilder()
.withUrl('/hubs/data')
.withAutomaticReconnect()
.build();
connection.on('RowsUpdated', (deltas: any[]) => {
// Patch only changed rows — no full re-render
apiRef.current.updateRows(deltas);
// Flash animation per updated row
for (const delta of deltas) {
const el = apiRef.current.getRowElement(delta.id);
if (el) {
el.classList.add('row-flash');
// Clear previous timeout for this row
const prev = flashTimeouts.current.get(delta.id);
if (prev) clearTimeout(prev);
flashTimeouts.current.set(
delta.id,
setTimeout(() => el.classList.remove('row-flash'), 600),
);
}
}
});
connection.start();
return () => { connection.stop(); };
}, [apiRef]);
return (
<DataGrid
apiRef={apiRef}
rows={initialRows}
columns={columns}
sx={{
'@keyframes rowFlash': {
'0%': { backgroundColor: 'rgba(56,189,248,0.25)' },
'100%': { backgroundColor: 'transparent' },
},
'& .row-flash': {
animation: 'rowFlash 600ms ease-out',
},
// Green flash for price up, red for down
'& .row-flash-up': {
animation: 'rowFlash 600ms ease-out',
'@keyframes rowFlash': { '0%': { bgcolor: 'rgba(22,163,74
Установить advanced-widgets в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGlobGrepWriteEditFAQ
Что делает скилл advanced-widgets?
Top 0.01% MUI patterns — sparkline grid cells, heatmap DataGrids, real-time WebSocket grids, AI assistant, save/restore grid state, bi-directional chart+grid, pivot tables, clipboard paste, progress cells
Как установить скилл advanced-widgets?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл advanced-widgets запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic