kliping.pro
  • Docs
  • Directory
  • Colors
  • Typeset
Docs
    • Overview
    • Getting Started
    • Examples
    • registry.json
    • registry-item.json
    • FAQ

FAQ

PreviousNext

Frequently asked questions about running a registry.

Pertanyaan yang Sering Diajukan ​

Seperti apa bentuk komponen yang rumit? ​

Berikut contoh komponen rumit yang sekaligus memasang satu halaman, dua komponen, satu composable, satu utilitas format tanggal, dan satu berkas konfigurasi.

json
{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "hello-world",
  "title": "Hello World",
  "type": "registry:block",
  "description": "A complex hello world component",
  "files": [
    {
      "path": "registry/new-york/HelloWorld/page.vue",
      "type": "registry:page",
      "target": "pages/hello/index.vue"
    },
    {
      "path": "registry/new-york/HelloWorld/components/HelloWorld.vue",
      "type": "registry:component"
    },
    {
      "path": "registry/new-york/HelloWorld/components/FormattedMessage.vue",
      "type": "registry:component"
    },
    {
      "path": "registry/new-york/HelloWorld/composables/useHello.ts",
      "type": "registry:hook"
    },
    {
      "path": "registry/new-york/HelloWorld/lib/formatDate.ts",
      "type": "registry:utils"
    },
    {
      "path": "registry/new-york/HelloWorld/hello.config.ts",
      "type": "registry:file",
      "target": "~/hello.config.ts"
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

Bagaimana cara menambahkan warna Tailwind baru? ​

Untuk menambahkan warna baru, daftarkan di cssVars dan tailwind.config.theme.extend.colors.

json
{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "hello-world",
  "title": "Hello World",
  "type": "registry:block",
  "description": "A complex hello world component",
  "files": [
    // ...
  ],
  "cssVars": {
    "light": {
      "brand-background": "20 14.3% 4.1%",
      "brand-accent": "20 14.3% 4.1%"
    },
    "dark": {
      "brand-background": "20 14.3% 4.1%",
      "brand-accent": "20 14.3% 4.1%"
    }
  },
  "tailwind": {
    "config": {
      "theme": {
        "extend": {
          "colors": {
            "brand": {
              "DEFAULT": "hsl(var(--brand-background))",
              "accent": "hsl(var(--brand-accent))"
            }
          }
        }
      }
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

CLI akan memperbarui berkas CSS project beserta tailwind.config.js. Setelah itu warna barunya bisa dipakai sebagai utility class: bg-brand dan text-brand-accent.

Bagaimana cara menambahkan animasi Tailwind? ​

Untuk menambahkan animasi baru, daftarkan di tailwind.config.theme.extend.animation dan tailwind.config.theme.extend.keyframes.

json
{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "hello-world",
  "title": "Hello World",
  "type": "registry:block",
  "description": "A complex hello world component",
  "files": [
    // ...
  ],
  "tailwind": {
    "config": {
      "theme": {
        "extend": {
          "keyframes": {
            "wiggle": {
              "0%, 100%": { "transform": "rotate(-3deg)" },
              "50%": { "transform": "rotate(3deg)" }
            }
          },
          "animation": {
            "wiggle": "wiggle 1s ease-in-out infinite"
          }
        }
      }
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Previousregistry-item.jsonNext scroll-fade

On This Page

Pertanyaan yang Sering DiajukanSeperti apa bentuk komponen yang rumit?Bagaimana cara menambahkan warna Tailwind baru?Bagaimana cara menambahkan animasi Tailwind?
Dirilis di bawah lisensi MIT. Ditulis ulang untuk Vue dari shadcn-vue, shadcn-ui-blocks, dan shadcn-hooks. Hak cipta © 2026 Kliping