Dashboard Patterns logo

Dashboard Patterns

Community
ilyasibrahim
dashboard-patterns

Reusable React/JavaScript patterns for Somali dialect classifier dashboard. Covers Chart.js integration, data card components, filter patterns, responsive layouts, and dashboard-specific UI patterns. Auto-invokes when building dashboard components, charts, data visualizations, or dashboard UI.

Overview

Publisherilyasibrahim
Repositoryclaude-agents-coordination
Skill namedashboard-patterns
Stars
83
Forks
15
Bundled files
Instructions only
LicenseUnlicense
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ilyasibrahim on GitHub. Read the source before you install it.

Installation

Install the Dashboard Patterns AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ilyasibrahim/claude-agents-coordination.git /tmp/claude-agents-coordination
mkdir -p .claude/skills
cp -r /tmp/claude-agents-coordination/claude-project/skills/frontend/dashboard-patterns .claude/skills/dashboard-patterns
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Dashboard Patterns in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Dashboard Patterns on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Dashboard Patterns is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Dashboard Patterns for Somali Dialect Classifier

Chart.js Integration

Pattern 1: Bar Chart Component

javascript
function DialectDistributionChart({ data }) {
  const chartRef = useRef(null);
  const chartInstance = useRef(null);

  useEffect(() => {
    if (!chartRef.current) return;

    // Destroy previous chart
    if (chartInstance.current) {
      chartInstance.current.destroy();
    }

    const ctx = chartRef.current.getContext('2d');

    chartInstance.current = new Chart(ctx, {
      type: 'bar',
      data: {
        labels: ['Northern', 'Southern', 'Central'],
        datasets: [{
          label: 'Records',
          data: [data.northern, data.southern, data.central],
          backgroundColor: ['#33BBEE', '#0077BB', '#66CCEE']  // Data colors
        }]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            display: false
          }
        }
      }
    });

    return () => {
      if (chartInstance.current) {
        chartInstance.current.destroy();
      }
    };
  }, [data]);

  return (
    <div className="chart-container" style={{ height: '300px' }}>
      <canvas ref={chartRef}></canvas>
    </div>
  );
}

Pattern 2: Line Chart with Time Series

javascript
function MetricsOverTimeChart({ timeSeriesData }) {
  const chartRef = useRef(null);

  useEffect(() => {
    if (!chartRef.current) return;

    const ctx = chartRef.current.getContext('2d');

    new Chart(ctx, {
      type: 'line',
      data: {
        labels: timeSeriesData.map(d => d.date),
        datasets: [{
          label: 'Accuracy',
          data: timeSeriesData.map(d => d.accuracy),
          borderColor: '#33BBEE',  // Data cyan
          backgroundColor: 'rgba(51, 187, 238, 0.1)',
          tension: 0.4
        }]
      },
      options: {
        responsive: true,
        plugins: {
          tooltip: {
            callbacks: {
              label: (context) => `Accuracy: ${(context.parsed.y * 100).toFixed(1)}%`
            }
          }
        }
      }
    });
  }, [timeSeriesData]);

  return <canvas ref={chartRef}></canvas>;
}

Data Card Components

Pattern 1: Metric Card

javascript
function MetricCard({ label, value, trend, trendDirection }) {
  return (
    <div className="data-card">
      <div className="data-card__label">{label}</div>
      <div className="data-card__value">{value.toLocaleString()}</div>
      {trend && (
        <div className="data-card__trend">
          {trendDirection === 'up' && <span className="trend-icon"></span>}
          {trendDirection === 'down' && <span className="trend-icon"></span>}
          <span className="data-card__trend-text">{trend}</span>
        </div>
      )}
    </div>
  );
}

// Usage
<MetricCard
  label="Total Records"
  value={12345}
  trend="+12.5% from last month"
  trendDirection="up"
/>

Pattern 2: Grid of Metric Cards

javascript
function MetricsGrid({ metrics }) {
  return (
    <div className="metrics-grid">
      {metrics.map((metric, idx) => (
        <MetricCard
          key={idx}
          label={metric.label}
          value={metric.value}
          trend={metric.trend}
          trendDirection={metric.trendDirection}
        />
      ))}
    </div>
  );
}

// CSS
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

Filter Patterns

Pattern 1: Toggle Capsule Filter

javascript
function DialectFilter({ selected, onChange }) {
  const dialects = ['All', 'Northern', 'Southern', 'Central'];

  return (
    <div className="data-toggle">
      {dialects.map(dialect => (
        <button
          key={dialect}
          className={`data-toggle__option ${
            selected === dialect ? 'data-toggle__option--active' : ''
          }`}
          onClick={() => onChange(dialect)}
        >
          {dialect}
        </button>
      ))}
    </div>
  );
}

Pattern 2: Date Range Filter

javascript
function DateRangeFilter({ startDate, endDate, onChange }) {
  return (
    <div className="filter-group">
      <label>Date Range</label>
      <div className="date-inputs">
        <input
          type="date"
          value={startDate}
          onChange={(e) => onChange({ start: e.target.value, end: endDate })}
          className="form__input"
        />
        <span>to</span>
        <input
          type="date"
          value={endDate}
          onChange={(e) => onChange({ start: startDate, end: e.target.value })}
          className="form__input"
        />
      </div>
    </div>
  );
}

Data Fetching Patterns

Pattern 1: Custom Hook for Data Fetching

javascript
function useDataFetch(endpoint) {
  const [data, setData] = useState(null);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);

  useEffect(() => {
    async function fetchData() {
      try {
        setLoading(true);
        const response = await fetch(endpoint);
        if (!response.ok) throw new Error('Failed to fetch');
        const json = await response.json();
        setData(json);
      } catch (err) {
        setError(err.message);
      } finally {
        setLoading(false);
      }
    }

    fetchData();
  }, [endpoint]);

  return { data, loading, error };
}

// Usage
function DashboardView() {
  const { data, loading, error } = useDataFetch('/api/metrics');

  if (loading) return <LoadingSpinner />;
  if (error) return <ErrorMessage message={error} />;

  return <MetricsGrid metrics={data} />;
}

Loading & Empty States

Pattern 1: Loading Skeleton

javascript
function ChartSkeleton() {
  return (
    <div className="chart-skeleton">
      <div className="skeleton-bar" />
      <div className="skeleton-bar" />
      <div className="skeleton-bar" />
    </div>
  );
}

// CSS
.skeleton-bar {
  height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
  margin-bottom: 1rem;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

Pattern 2: Empty State

javascript
function EmptyState({ message, action }) {
  return (
    <div className="empty-state">
      <svg className="empty-state__icon" width="64" height="64">
        {/* Icon SVG */}
      </svg>
      <p className="empty-state__message">{message}</p>
      {action && (
        <button className="btn btn--primary" onClick={action.onClick}>
          {action.label}
        </button>
      )}
    </div>
  );
}

// Usage
<EmptyState
  message="No data available. Upload your first dataset to get started."
  action={{
    label: "Upload Dataset",
    onClick: handleUpload
  }}
/>

Responsive Layout Patterns

Pattern 1: Responsive Grid

css
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  padding: 2rem;
}

.dashboard-grid__full {
  grid-column: 1 / -1;
}

.dashboard-grid__half {
  grid-column: span 6;
}

.dashboard-grid__third {
  grid-column: span 4;
}

@media (max-width: 768px) {
  .dashboard-grid__half,
  .dashboard-grid__third {
    grid-column: 1 / -1;
  }
}

Error Handling

Pattern 1: Error Boundary

javascript
class ErrorBoundary extends React.Component {
  constructor(props) {
    super(props);
    this.state = { hasError: false, error: null };
  }

  static getDerivedStateFromError(error) {
    return { hasError: true, error };
  }

  componentDidCatch(error, errorInfo) {
    console.error('Dashboard error:', error, errorInfo);
  }

  render() {
    if (this.state.hasError) {
      return (
        <div className="error-message">
          <h2>Something went wrong</h2>
          <p>{this.state.error.message}</p>
          <button onClick={() => window.location.reload()}>
            Reload Dashboard
          </button>
        </div>
      );
    }

    return this.props.children;
  }
}

// Usage
<ErrorBoundary>
  <DashboardView />
</ErrorBoundary>

Performance Optimization

Pattern 1: Memoized Chart Component

javascript
const MemoizedChart = React.memo(({ data }) => {
  return <DialectDistributionChart data={data} />;
}, (prevProps, nextProps) => {
  // Only re-render if data actually changed
  return JSON.stringify(prevProps.data) === JSON.stringify(nextProps.data);
});

Pattern 2: Debounced Filter

javascript
function useDebounce(value, delay) {
  const [debouncedValue, setDebouncedValue] = useState(value);

  useEffect(() => {
    const handler = setTimeout(() => {
      setDebouncedValue(value);
    }, delay);

    return () => clearTimeout(handler);
  }, [value, delay]);

  return debouncedValue;
}

// Usage in search filter
function SearchFilter() {
  const [searchTerm, setSearchTerm] = useState('');
  const debouncedSearch = useDebounce(searchTerm, 300);

  useEffect(() => {
    if (debouncedSearch) {
      fetchFilteredData(debouncedSearch);
    }
  }, [debouncedSearch]);

  return (
    <input
      type="text"
      value={searchTerm}
      onChange={(e) => setSearchTerm(e.target.value)}
      placeholder="Search..."
    />
  );
}

When This Skill Activates

This skill auto-invokes when you mention:

  • Dashboard, dashboard components, dashboard UI
  • Chart.js, charts, data visualization
  • React patterns, React components, React hooks
  • Data cards, metric cards, KPI cards
  • Filters, filtering, toggle filters
  • Loading states, empty states, skeletons
  • Responsive layout, grid layout
  • Data fetching, API integration

Version: 1.0.0 Last Updated: 2025-11-06 Project: Somali Dialect Classifier Dashboard

Frequently asked questions

What does the Dashboard Patterns AI skill do?

Reusable React/JavaScript patterns for Somali dialect classifier dashboard. Covers Chart.js integration, data card components, filter patterns, responsive layouts, and dashboard-specific UI patterns. Auto-invokes when building dashboard components, charts, data visualizations, or dashboard UI.

Why use Dashboard Patterns on TypingMind?

Because you install it once and use it with any model. Dashboard Patterns is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Dashboard Patterns in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ilyasibrahim/claude-agents-coordination/tree/main/claude-project/skills/frontend/dashboard-patterns. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Dashboard Patterns?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Dashboard Patterns?

As many as you like. As long as a model supports skills, you can use Dashboard Patterns with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Dashboard Patterns AI skill free?

Yes. It is published on GitHub by ilyasibrahim under the Unlicense license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇