Kliping
KlipingBerandaDokumentasiKomponenBlocksVariasiTemplateDice UIHooks
Bagian
  • Pengenalan
  • Komponen
  • Instalasi
  • Tema & Kustomisasi
  • Mode Gelap
  • CLI
  • RTL
  • Skills
  • Server MCP
  • Form
  • Catatan Perubahan
Instalasi
  • Vite
  • Nuxt
  • Astro
  • Laravel
  • Manual
Mode Gelap
  • Vite
  • Nuxt
  • Vitepress
  • Astro
Form
  • VeeValidate
  • TanStack Form
  • Formisch
Registry
  • Ikhtisar
  • Memulai
  • Contoh
  • registry.json
  • registry-item.json
  • Tanya Jawab
Utilitas
  • scroll-fade
  • shimmer
Lainnya
  • components.json
  • JavaScript
  • Figma
  • Direktori Registry
  • Warna
  • Typeset
  • Dokumentasi Lama
  • Tentang
  • Kredit
  • Kontribusi
Komponen
  • Accordion
  • Alert
  • Alert Dialog
  • Aspect Ratio
  • Attachment
  • Avatar
  • Badge
  • Breadcrumb
  • Bubble
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • Context Menu
  • Data Table
  • Date Picker
  • Dialog
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • Form
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kbd
  • Label
  • Marker
  • Menubar
  • Message
  • Message Scroller
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Pin Input
  • Popover
  • Progress
  • Questionnaire
  • Radio Group
  • Range Calendar
  • Resizable
  • Scroll Area
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Spinner
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tags Input
  • Textarea
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Typography

registry-item.json

SebelumnyaBerikutnya

Spesifikasi untuk item registry.

Skema registry-item.json dipakai untuk mendefinisikan item registry buatan Anda.

json
{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "hello-world",
  "type": "registry:block",
  "title": "Hello World",
  "description": "A simple hello world component.",
  "files": [
    {
      "path": "registry/new-york/HelloWorld/HelloWorld.vue",
      "type": "registry:component"
    },
    {
      "path": "registry/new-york/HelloWorld/useHelloWorld.ts",
      "type": "registry:hook"
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Definisi ​

JSON Schema untuk registry-item.json bisa Anda lihat di sini.

$schema ​

Properti $schema menentukan skema untuk berkas registry-item.json.

json
{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json"
}
1
2
3

name ​

Properti name menentukan nama item registry Anda.

json
{
  "name": "hello-world"
}
1
2
3

title ​

Judul item registry Anda dalam bahasa yang mudah dibaca. Buat singkat tapi jelas.

json
{
  "title": "Hello World"
}
1
2
3

description ​

Keterangan item registry Anda. Boleh lebih panjang dan rinci dibanding title.

json
{
  "description": "A simple hello world component."
}
1
2
3

type ​

Properti type menentukan jenis item registry Anda.

json
{
  "type": "registry:block"
}
1
2
3

Jenis yang didukung:

TypeDescription
registry:blockUse for complex components with multiple files.
registry:componentUse for simple components.
registry:libUse for lib and utils.
registry:hookUse for composables (hooks).
registry:uiUse for UI components and single-file primitives
registry:pageUse for page or file-based routes.
registry:fileUse for miscellaneous files.

author ​

Properti author menentukan pembuat item registry-nya.

Nilainya boleh khusus untuk item itu, atau sama dengan pembuat registry-nya.

json
{
  "author": "John Doe <john@doe.com>"
}
1
2
3

dependencies ​

Properti dependencies menentukan dependency item registry Anda. Isinya paket npm.

Pakai @versi untuk mengunci versi item registry Anda.

json
{
  "dependencies": [
    "reka-ui",
    "zod",
    "@lucide/vue",
    "name@1.0.2"
  ]
}
1
2
3
4
5
6
7
8

registryDependencies ​

Dipakai untuk dependency registry. Isinya boleh berupa nama atau URL.

  • Untuk item registry bawaan seperti button, input, atau select, cukup tulis namanya, misalnya ['button', 'input', 'select'].
  • Untuk item registry kustom, tulis URL-nya, misalnya ['https://example.com/r/hello-world.json'].
json
{
  "registryDependencies": [
    "button",
    "input",
    "select",
    "https://example.com/r/editor.json"
  ]
}
1
2
3
4
5
6
7
8

Catatan: CLI otomatis menyelesaikan dependency registry jarak jauh.

files ​

Properti files menentukan berkas-berkas item registry Anda. Tiap berkas punya properti path, type, dan target (opsional).

Properti target wajib diisi untuk jenis registry:page dan registry:file.

json
{
  "files": [
    {
      "path": "registry/new-york/HelloWorld/page.vue",
      "type": "registry:page",
      "target": "pages/hello/index.vue"
    },
    {
      "path": "registry/new-york/HelloWorld/HelloWorld.vue",
      "type": "registry:component"
    },
    {
      "path": "registry/new-york/HelloWorld/useHelloWorld.ts",
      "type": "registry:hook"
    },
    {
      "path": "registry/new-york/HelloWorld/.env",
      "type": "registry:file",
      "target": "~/.env"
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

path ​

Properti path menentukan lokasi berkas di dalam registry Anda. Path ini dipakai script build untuk membaca, mengubah, dan menyusun payload JSON registry-nya.

type ​

Properti type menentukan jenis berkasnya. Keterangan lengkapnya ada di bagian type.

target ​

Properti target menunjukkan di mana berkas itu ditempatkan dalam sebuah project. Sifatnya opsional, dan hanya wajib untuk jenis registry:page dan registry:file.

Secara bawaan, CLI membaca berkas components.json project untuk menentukan path tujuannya. Untuk berkas tertentu seperti route atau konfigurasi, path tujuannya bisa Anda tentukan sendiri.

Pakai ~ untuk merujuk root project, misalnya ~/foo.config.js.

tailwind ​

SUDAH TIDAK DIPAKAI: untuk project Tailwind v4, gunakan cssVars.theme.

Properti tailwind dipakai untuk konfigurasi Tailwind seperti theme, plugins, dan content.

Properti tailwind.config bisa Anda pakai untuk menambahkan warna, animasi, dan plugin ke item registry Anda.

json
{
  "tailwind": {
    "config": {
      "theme": {
        "extend": {
          "colors": {
            "brand": "hsl(var(--brand))"
          },
          "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

cssVars ​

Dipakai untuk mendefinisikan CSS variable bagi item registry Anda.

json
{
  "cssVars": {
    "light": {
      "brand": "20 14.3% 4.1%",
      "radius": "0.5rem"
    },
    "dark": {
      "brand": "20 14.3% 4.1%"
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11

css ​

Pakai css untuk menambahkan aturan baru ke berkas CSS project, misalnya @layer base, @layer components, @utility, atau @keyframes.

json
{
  "css": {
    "@layer base": {
      "body": {
        "font-size": "var(--text-base)",
        "line-height": "1.5"
      }
    },
    "@layer components": {
      "button": {
        "background-color": "var(--color-primary)",
        "color": "var(--color-white)"
      }
    },
    "@utility text-magic": {
      "font-size": "var(--text-base)",
      "line-height": "1.5"
    },
    "@keyframes wiggle": {
      "0%, 100%": {
        "transform": "rotate(-3deg)"
      },
      "50%": {
        "transform": "rotate(3deg)"
      }
    }
  }
}
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

docs ​

Pakai docs untuk menampilkan dokumentasi atau pesan khusus saat item registry Anda dipasang lewat CLI.

json
{
  "docs": "Remember to add the FOO_BAR environment variable to your .env file."
}
1
2
3

categories ​

Pakai categories untuk mengelompokkan item registry Anda.

json
{
  "categories": ["sidebar", "dashboard"]
}
1
2
3

meta ​

Pakai meta untuk menambahkan metadata tambahan pada item registry Anda. Pasangan key/value apa pun boleh Anda tambahkan.

json
{
  "meta": { "foo": "bar" }
}
1
2
3
registry.jsonTanya Jawab

Di halaman ini

Definisi$schemanametitledescriptiontypeauthordependenciesregistryDependenciesfilestailwindcssVarscssdocscategoriesmeta
Dirilis di bawah lisensi MIT. Ditulis ulang untuk Vue dari shadcn-vue, shadcn-ui-blocks, dan shadcn-hooks. Hak cipta © 2026 Kliping