Index of every page on this site: llms.txt
All skills
Run it yourself

Use when starting, installing, adding, theming or fixing shadcn-vue in any Vue 3 project (Laravel + Inertia, Vite, Nuxt) — running the CLI (init, add, apply, migrate rtl, components.json), what init writes and where, the day-one component set, choosing the registry component for a need instead of a styled div, composition rules (items in groups, dialog titles, whole cards), customising a registry component through a wrapper instead of editing it, keeping the vendored components/ui folder healthy when add rewrites the stylesheet or reverts edits, the theme stylesheet with light and dark tokens, Arabic and Latin fonts, charts with Unovis, and the RTL gaps of the registry. Triggers include "shadcn", "shadcn-vue add", "shadcn-vue init", "components.json", "Reka UI", "dark mode tokens", "new Vue project UI setup", «ثبّت shadcn», «مكونات الواجهة», «الوضع الغامق», «اتجاه RTL», «ابدأ مشروع Vue».

Use this Skill: https://skilld.dev/gh/haythamasalama/skills/shadcn-vue-kit

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescharts.md

≈1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Charts

Read when: putting a chart on a screen. Owns: composing a chart with the registry's chart component and Unovis, its config, the y domain, the types that trip the compiler, and what data a chart may show. Chart colours are in theme.md.

TL;DR

  • npx shadcn-vue@latest add chart, plus @unovis/vue and @unovis/ts (checked 2026-11-03).
  • The chart component does not wrap Unovis. You compose Vis* components inside ChartContainer.
  • Colours come from the config as var(--chart-n), and series reference them as var(--color-<key>).
  • Pin the y domain yourself.
  • Plot real data only.

Composition

<script setup lang="ts">
import { VisArea, VisAxis, VisLine, VisXYContainer } from '@unovis/vue';
import { computed } from 'vue';
import {
    ChartContainer,
    ChartCrosshair,
    ChartTooltip,
    ChartTooltipContent,
    componentToString,
    type ChartConfig,
} from '@/components/ui/chart';

type Point = { label: string; value: number };
type Row = Point & { index: number };

const props = defineProps<{ points: Point[] }>();

const headroom = (values: number[]): [number, number] => [0, Math.max(1, ...values)];

const config = { value: { label: 'Invoices', color: 'var(--chart-1)' } } satisfies ChartConfig;
const rows = computed<Row[]>(() => props.points.map((p, index) => ({ ...p, index })));
const domain = computed(() => headroom(props.points.map((p) => p.value)));
const label = (tick: number | Date) => rows.value[Number(tick)]?.label ?? '';
const whole = (tick: number | Date) => String(Math.round(Number(tick)));
</script>

<template>
    <ChartContainer :config="config" class="aspect-auto h-64">
        <VisXYContainer :data="rows" :y-domain="domain" :margin="{ top: 8, bottom: 8 }">
            <VisArea :x="(d: Row) => d.index" :y="(d: Row) => d.value" color="var(--color-value)" :opacity="0.15" />
            <VisLine :x="(d: Row) => d.index" :y="(d: Row) => d.value" color="var(--color-value)" />
            <VisAxis type="x" :tick-line="false" :domain-line="false" :grid-line="false" :tick-format="label" />
            <VisAxis type="y" :tick-line="false" :domain-line="false" :tick-format="whole" :num-ticks="4" />
            <ChartTooltip />
            <ChartCrosshair :template="componentToString(config, ChartTooltipContent, { labelFormatter: label })" />
        </VisXYContainer>
    </ChartContainer>
</template>
  • config maps each series key to a label, a color (or theme: { light, dark }) and an optional icon. ChartStyle, inside ChartContainer, turns each into a --color-<key> property scoped to that chart; the color props reference it.
  • ChartTooltip and ChartCrosshair are Unovis's VisTooltip and VisCrosshair re-exported; the look comes from ChartTooltipContent (labelKey, nameKey, indicator, hideLabel, hideIndicator). ChartLegendContent adds a legend.
  • Give the container a height (h-64) and aspect-auto, or it takes the default aspect ratio.

Pin the y domain

Left to choose, Unovis pads the scale, and a small period renders as a few pixels of ink. Compute the domain (headroom above) and pass :y-domain, with :num-ticks small enough that labels don't crowd. Math.max(1, …) keeps an all-zero series from collapsing the axis.

Types

  • Unovis types a tick as number | Date, so a formatter must accept both, even when the axis plots a row index.
  • A & intersection inside a template expression breaks the Vue template compiler. Declare type Row = Point & { index: number } in the script and use the alias.

The data has to be real

A chart needs a real series. Don't invent one and don't ship placeholder numbers: an honest empty chart (with Empty over it) beats a full one that is not. Load the series where every other read happens (a page prop, a query). When tests run on a different database engine than production, group by period in application code, because date functions differ between engines.

Direction

Axes run left to right even inside an Arabic page; that is the normal convention for a time series. Leave it.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts20d3 checks · Risk SAFE
  • Gen Agent Trust Hub20d

    The skill provides comprehensive and safe guidance for setting up and using shadcn-vue in Vue 3 projects. It encourages best practices such as reviewing code changes with git, avoiding dangerous CLI flags without review, and using semantic design tokens. The external tools and packages mentioned are industry-standard for the described use case.

  • Socket20d

    No alerts

  • Snyk20d

    Risk: LOW · No issues

Signed by skilld at 54e769e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 3 weeks ago
Other metadata
metadata
{
  "summary": "shadcn-vue setup with a ready theme, wrappers, charts and RTL fixes.",
  "tags": "shadcn-vue, vue, ui, tailwindcss, rtl"
}

README badge

README badge for haythamasalama/skills/shadcn-vue-kit