@@ -67,3 +71,7 @@ badges:
::alert{to="/components/docs/tabs"}
`::code-group`{lang="mdc"} is a wrapper around `::tabs{variant="card"}`{lang="mdc"}.
::
+
+## Props
+
+:field{name="sync" type="string"}[Sync scope for `::tabs`]
diff --git a/content/2.components/2.docs/field-group.md b/content/2.components/2.docs/field-group.md
index a0f217f3..15367bdf 100644
--- a/content/2.components/2.docs/field-group.md
+++ b/content/2.components/2.docs/field-group.md
@@ -11,8 +11,10 @@ badges:
target: _blank
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+## Usage
+
+::stack
+ ::div{class="p-4"}
::field-group
::field{name="withDefault" type="boolean" defaultValue="true"}
A field with a default value.
@@ -35,7 +37,7 @@ badges:
::
::
- ```mdc [Code]
+ ```mdc
::field-group
::field{name="withDefault" type="boolean" defaultValue="true"}
A field with a default value.
diff --git a/content/2.components/2.docs/field.md b/content/2.components/2.docs/field.md
index 5ce177a6..54e05d84 100644
--- a/content/2.components/2.docs/field.md
+++ b/content/2.components/2.docs/field.md
@@ -11,13 +11,15 @@ badges:
target: _blank
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+## Usage
+
+::stack
+ ::div{class="p-4"}
::field{name="Field" type="string" defaultValue="'default'" required}
The _description_ can be set as prop or in the default slot with full **markdown** support.
::
::
- ```mdc [Code]
+ ```mdc
::field{name="Field" type="string" defaultValue="'default'" required}
The _description_ can be set as prop or in the default slot with full **markdown** support.
::
@@ -25,3 +27,13 @@ badges:
::
The text `required` is configurable in [`main.fieldRequiredText`](/api/configuration/shadcn-docs#main).
+
+## Props
+
+::field-group
+ :field{name="name" type="string"}[Field name]
+ :field{name="type" type="string"}[Field type]
+ :field{name="description" type="string"}[Field description]
+ :field{name="defaultValue" type="string"}[Field default value]
+ :field{name="required" type="boolean"}[Whether the field is required]
+::
diff --git a/content/2.components/2.docs/icon.md b/content/2.components/2.docs/icon.md
index 22024189..ffe8fbd4 100644
--- a/content/2.components/2.docs/icon.md
+++ b/content/2.components/2.docs/icon.md
@@ -15,19 +15,17 @@ badges:
The icon component uses **Nuxt Icon** under the hood. Check out the usage guide from Nuxt Icon.
::
-::code-group
- ::div{label="Preview" class="md:p-4"}
-
+## Usage
+::stack
+ ::div{class="p-4 space-x-2"}
:icon{name="lucide:box"}
:icon{name="vscode-icons:file-type-js-official"}
:icon{name="vscode-icons:file-type-vue"}
:icon{name="vscode-icons:file-type-nuxt" size="30"}
-
-
::
- ```mdc [Code]
+ ```mdc
:icon{name="lucide:box"}
:icon{name="vscode-icons:file-type-js-official"}
:icon{name="vscode-icons:file-type-vue"}
@@ -43,14 +41,14 @@ npm i -D @iconify-json/collection-name
`@iconify-json/lucide` and `@iconify-json/vscode-icons` are installed by default.
-#### Smart Icon
+### Smart Icon
:badge[0.5.3]{variant="outline"}
You can put iconify icons, emojis and urls in `smart-icon`. Smart icon will render them automatically.
-::code-group
- ::div{label="Preview" class="md:p-4"}
+::stack
+ ::div{class="p-4"}
**Iconify**
@@ -78,15 +76,18 @@ You can put iconify icons, emojis and urls in `smart-icon`. Smart icon will rend
::
- ```mdc [Code]
+ ```mdc
+ **Iconify**
:smart-icon{name="lucide:box"}
:smart-icon{name="vscode-icons:file-type-js-official"}
:smart-icon{name="vscode-icons:file-type-vue"}
+ **Emojis**
:smart-icon{name="😍"}
:smart-icon{name="🚀"}
:smart-icon{name="🎉" size=30}
+ **URL**
:smart-icon{name="/logo.svg"}
:smart-icon{name="https://vueuse.org/favicon.svg" size=40}
```
diff --git a/content/2.components/2.docs/pm.md b/content/2.components/2.docs/pm.md
index d65358c9..afa6eff8 100644
--- a/content/2.components/2.docs/pm.md
+++ b/content/2.components/2.docs/pm.md
@@ -10,41 +10,58 @@ badges:
- value: 0.8.0
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
- #### Install
+## Usage
+
+The package managers shown can be configured in [`main.pm`](/api/configuration/shadcn-docs#main).
+
+### Install
+
+::stack
+ ::div{class="p-4"}
:pm-install{name="shadcn-docs-nuxt"}
:pm-install{name="shadcn-docs-nuxt" save-dev}
:pm-install
:pm-install{name="-g nuxi@latest"}
-
- #### Run
- :pm-run{script="dev"}
- :pm-run{script="build --watch -o"}
-
- #### X
- :pm-x{command="nuxi@latest init
"}
-
- #### No Sync
- :pm-x{command="nuxi@latest init " no-sync}
::
- ```mdc [Code]
- #### Install
+ ```mdc
:pm-install{name="shadcn-docs-nuxt"}
:pm-install{name="shadcn-docs-nuxt" save-dev}
:pm-install
:pm-install{name="-g nuxi@latest"}
+ ```
+::
+
+### Run
- #### Run
+::stack
+ ::div{class="p-4"}
+ :pm-run{script="dev"}
+ :pm-run{script="build --watch -o"}
+ ::
+ ```mdc
:pm-run{script="dev"}
:pm-run{script="build --watch -o"}
+ ```
+::
- #### X
+### X
+
+::stack
+ ::div{class="p-4"}
+ :pm-x{command="nuxi@latest init "}
+ ::
+ ```mdc
:pm-x{command="nuxi@latest init "}
+ ```
+::
- #### No Sync
+### No Sync
+
+::stack
+ ::div{class="p-4"}
+ :pm-x{command="nuxi@latest init " no-sync}
+ ::
+ ```mdc
:pm-x{command="nuxi@latest init " no-sync}
```
::
-
-The package managers shown can be configured in [`main.pm`](/api/configuration/shadcn-docs#main).
diff --git a/content/2.components/2.docs/read-more.md b/content/2.components/2.docs/read-more.md
index dcb103c4..150030fc 100644
--- a/content/2.components/2.docs/read-more.md
+++ b/content/2.components/2.docs/read-more.md
@@ -11,18 +11,29 @@ badges:
target: _blank
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+## Usage
+
+::stack
+ ::div{class="p-4"}
:read-more{to="/getting-started/writing/markdown"}
:read-more{title="Nuxt website" to="https://nuxt.com/"}
:read-more{to="https://nuxt.com/"}
:read-more{icon="lucide:link" to="https://nuxt.com/"}
::
- ```mdc [Code]
+ ```mdc
:read-more{to="/getting-started/writing/markdown"}
:read-more{title="Nuxt website" to="https://nuxt.com/"}
:read-more{to="https://nuxt.com/"}
:read-more{icon="lucide:link" to="https://nuxt.com/"}
```
::
+
+## Props
+
+::field-group
+ :field{name="title" type="string"}[Read More title]
+ :field{name="icon" type="string"}[Read More icon]
+ :field{name="to" type="string"}[Link URL]
+ :field{name="target" type="Target"}[A `target` attribute value to apply on the link]
+::
diff --git a/content/2.components/2.docs/shortcut.md b/content/2.components/2.docs/shortcut.md
index 9d1114ba..f5450988 100644
--- a/content/2.components/2.docs/shortcut.md
+++ b/content/2.components/2.docs/shortcut.md
@@ -12,15 +12,25 @@ badges:
- value: 0.6.3
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+## Usage
+
+::stack
+ ::div{class="p-4"}
:shortcut{value="meta"} :shortcut{value="K"} :br
:shortcut{value="xs" size="xs"} :shortcut{value="sm"} :shortcut{value="md" size="md"}
::
- ```mdc [Code]
- :shortcut{value="meta"} :shortcut{value="K"} :br
+ ```mdc
+ :shortcut{value="meta"} :shortcut{value="K"}
+
:shortcut{value="xs" size="xs"} :shortcut{value="sm"} :shortcut{value="md" size="md"}
```
::
You can put `meta` in the `value` field to automatically display either :shortcut{value="⌘"} or :shortcut{value="Ctrl"} based on the platform.
+
+## Props
+
+::field-group
+ :field{name="value" type="string"}[Text in the shortcut]
+ :field{name="size" type="'xs' | 'sm' | 'md'" default-value="'sm'"}
+::
diff --git a/content/2.components/2.docs/stack.md b/content/2.components/2.docs/stack.md
index 877e8148..81b57ba2 100644
--- a/content/2.components/2.docs/stack.md
+++ b/content/2.components/2.docs/stack.md
@@ -9,8 +9,10 @@ badges:
- value: 0.6.2
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+## Usage
+
+::stack
+ ::div{class="p-4 md:p-8"}
::stack
::div{class="p-6 text-3xl font-bold"}
✨ Introducing Inspira UI
@@ -36,7 +38,7 @@ badges:
::
::
::
- ```mdc [Code]
+ ```mdc
::stack
::div{class="p-6 text-3xl font-bold"}
✨ Introducing Inspira UI
diff --git a/content/2.components/2.docs/steps.md b/content/2.components/2.docs/steps.md
index 649f225c..e67ed693 100644
--- a/content/2.components/2.docs/steps.md
+++ b/content/2.components/2.docs/steps.md
@@ -8,8 +8,10 @@ badges:
target: _blank
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+## Usage
+
+::stack
+ ::div{class="p-4 md:p-6"}
::steps
### Get Starter Template
@@ -58,7 +60,7 @@ badges:
::
::
::
- ```mdc [Code]
+ ```mdc height=400
::steps
### Get Starter Template
@@ -109,11 +111,11 @@ badges:
```
::
-#### Multi-level headings
+### Multi-level headings
:badge[0.4.6]{variant="outline"}
-::code-group
- ::div{label="Preview" class="md:p-4"}
+::stack
+ ::div{class="p-4 md:p-6"}
::steps{level=5}
##### Specify the level of headings to use
@@ -126,7 +128,7 @@ badges:
`h1` through `h6`. Defaults to `h3`.
::
::
- ```mdc[Code]
+ ```mdc
::steps{level=5}
##### Multi-level headings
@@ -140,3 +142,7 @@ badges:
::
```
::
+
+## Props
+
+:field{name="level" type="number"}[Specify the level of headings to use]
diff --git a/content/2.components/2.docs/tabs.md b/content/2.components/2.docs/tabs.md
index 5384d6d7..351f9453 100644
--- a/content/2.components/2.docs/tabs.md
+++ b/content/2.components/2.docs/tabs.md
@@ -11,10 +11,10 @@ badges:
target: _blank
---
-#### Default Style
+## Usage
-::code-group
- ::div{label="Preview" class="md:p-4"}
+::stack
+ ::div{class="p-4"}
::tabs
::div{label="PostgreSQL" icon="lucide:database"}
### PostgreSQL column types
@@ -57,7 +57,7 @@ badges:
::
::
::
- ```mdc [Code]
+ ```mdc height=300
::tabs
::div{label="PostgreSQL" icon="lucide:database"}
### PostgreSQL column types
@@ -102,10 +102,10 @@ badges:
```
::
-#### Card Style
+### Card Style
-::code-group
- ::div{label="Preview" class="md:p-4"}
+::stack
+ ::div{class="p-4"}
::tabs{variant="card"}
::div{label="Card Tab"}
### This is a card-style tab
@@ -118,7 +118,7 @@ badges:
```
::
::
- ```mdc [Code]
+ ```mdc
::tabs{variant="card"}
::div{label="Card Tab"}
### This is a card-style tab
@@ -133,11 +133,11 @@ badges:
```
::
-#### Line Style
+### Line Style
:badge[0.6.4]{variant="outline"}
-::code-group
- ::div{label="Preview" class="md:p-4"}
+::stack
+ ::div{class="p-4"}
::tabs{variant="line"}
::div{label="Preview" class="border flex min-h-[200px] w-full justify-center p-10 items-center rounded-lg shadow-sm"}
:badge[Badge]
@@ -153,7 +153,7 @@ badges:
::
::
::
- ```mdc [Code]
+ ```mdc
::tabs{variant="line"}
::div{label="Preview" class="border flex min-h-[200px] w-full justify-center p-10 items-center rounded-lg shadow-sm"}
:badge[Badge]
@@ -171,11 +171,11 @@ badges:
```
::
-#### Combobox Style
+### Combobox Style
:badge[0.7.5]{variant="outline"}
-::code-group
- ::div{label="Preview" class="md:p-4"}
+::stack
+ ::div{class="p-4"}
::tabs{variant="combobox" search-placeholder="Search database..." search-empty="No database found."}
::div{label="PostgreSQL"}
### PostgreSQL column types
@@ -218,7 +218,7 @@ badges:
::
::
::
- ```mdc [Code]
+ ```mdc height=300
::tabs{variant="combobox" search-placeholder="Search database..." search-empty="No database found."}
::div{label="PostgreSQL"}
### PostgreSQL column types
@@ -268,8 +268,8 @@ badges:
:read-more{to="/components/docs/pm"}
-::code-group
- ::div{label="Preview" class="md:p-4"}
+::stack
+ ::div{class="p-4 md:p-8"}
#### Scope 1
::tabs{variant="card" sync="your-scope-name"}
::div{label="Card Tab"}
@@ -315,7 +315,7 @@ badges:
```
::
::
- ```mdc [Code]
+ ```mdc height=400
#### Scope 1
::tabs{variant="card" sync="your-scope-name"}
::div{label="Card Tab"}
@@ -362,3 +362,14 @@ badges:
::
```
::
+
+## Props
+
+::field-group
+ :field{name="variant" type="'separate' | 'card' | 'line' | 'combobox'" default-value="'separate'"}
+ :field{name="padded" type="boolean" default-value="true"}
+ :field{name="disableSearch" type="boolean" default-value="false"}[For combobox variant]
+ :field{name="searchPlaceholder" type="string" default-value="'Search Tab...'"}[For combobox variant]
+ :field{name="searchEmpty" type="string" default-value="'No tab found.'"}[For combobox variant]
+ :field{name="sync" type="string"}[Sync scope]
+::
diff --git a/content/2.components/3.page/accordion.md b/content/2.components/3.page/accordion.md
index 8ee091b3..3733160d 100644
--- a/content/2.components/3.page/accordion.md
+++ b/content/2.components/3.page/accordion.md
@@ -9,8 +9,10 @@ badges:
- value: 0.5.0
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+## Usage
+
+::stack
+ ::div{class="p-4"}
::accordion{default-value="first-item" collapsible}
::accordion-item{value="first-item"}
#title
@@ -29,7 +31,7 @@ badges:
:accordion-item{title="Can it be animated?" content="Yes! You can use the transition prop to configure the animation."}
::
::
- ```mdc[Code]
+ ```mdc
::accordion{default-value="first-item" collapsible}
::accordion-item{value="first-item"}
#title
@@ -38,6 +40,7 @@ badges:
#content
Yes. It adheres to the WAI-ARIA design pattern.
::
+
::accordion-item
#title
Is it unstyled?
@@ -51,3 +54,21 @@ badges:
::
The `value` prop in `::accordion-item`{lang="mdc"} is auto-generated by default. You can set them to other _unique_ values and put them in the `default-value` prop of `::accordion`{lang="mdc"}.
+
+## Props
+
+#### `::accordion-item`{lang="mdc"}
+
+::field-group
+ :field{name="type" type="'single' | 'multiple'" default-value="'single'"}
+ :field{name="collapsible" type="boolean" default-value="undefined"}[Whether the items can be collapsed]
+ :field{name="defaultValue" type="string | string[]"}[Default open item]
+::
+
+#### `::accordion`{lang="mdc"}
+
+::field-group
+ :field{name="value" type="string"}[Item value]
+ :field{name="title" type="string"}[Item title]
+ :field{name="content" type="string"}[Item content]
+::
diff --git a/content/2.components/3.page/collapsible.md b/content/2.components/3.page/collapsible.md
index b4bed476..ab81de1e 100644
--- a/content/2.components/3.page/collapsible.md
+++ b/content/2.components/3.page/collapsible.md
@@ -12,10 +12,12 @@ badges:
- value: 0.5.8
---
-#### Simple
+## Usage
-::code-group
- ::div{label="Preview" class="md:p-4"}
+### Simple
+
+::stack
+ ::div{class="p-4 md:p-6"}
::collapsible
#title
Show properties
@@ -24,7 +26,7 @@ badges:
This is a **Simple** style collapsible.
::
::
- ```mdc[Code]
+ ```mdc
::collapsible
#title
Show properties
@@ -35,17 +37,25 @@ badges:
```
::
-#### Card
+### Card
-::code-group
- ::div{label="Preview" class="md:p-4"}
+::stack
+ ::div{class="p-4 md:p-6"}
::collapsible{variant="card" title="@peduarte starred 3 repositories"}
@radix-ui/primitives
::
::
- ```mdc[Code]
+ ```mdc
::collapsible{variant="card" title="@peduarte starred 3 repositories"}
@radix-ui/primitives
::
```
::
+
+## Props
+
+::field-group
+ :field{name="variant" type="'simple' | 'card'" default-value="'simple'"}
+ :field{name="title" type="string"}[Collapsible title]
+ :field{name="defaultOpen" type="boolean" default-value="false"}
+::
diff --git a/content/2.components/3.page/hero-alt.md b/content/2.components/3.page/hero-alt.md
index 37f5757c..03481c48 100644
--- a/content/2.components/3.page/hero-alt.md
+++ b/content/2.components/3.page/hero-alt.md
@@ -10,8 +10,10 @@ badges:
toc: false
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+## Usage
+
+::stack
+ ::div{class="p-4"}
::hero-alt
---
announcement:
@@ -32,7 +34,36 @@ toc: false
#description
Beautifully designed components that you can copy and paste into your apps.
::
+ ::
+ ```mdc
+ ::hero-alt
+ ---
+ announcement:
+ title: 'Introducing Charts'
+ icon: 'lucide:pie-chart'
+ to: /getting-started
+ actions:
+ - name: Get Started
+ to: /getting-started
+ - name: GitHub
+ variant: outline
+ to: https://github.com/ZTL-UwU/shadcn-docs-nuxt
+ leftIcon: 'lucide:github'
+ ---
+
+ #title
+ Build your component library
+
+ #description
+ Beautifully designed components that you can copy and paste into your apps.
+ ::
+ ```
+::
+
+### Right
+::stack
+ ::div{class="p-4"}
::hero-alt
---
announcement:
@@ -58,29 +89,7 @@ toc: false
![logo](/logo.svg)
::
::
- ```mdc[Code]
- ::hero-alt
- ---
- announcement:
- title: 'Introducing Charts'
- icon: 'lucide:pie-chart'
- to: /getting-started
- actions:
- - name: Get Started
- to: /getting-started
- - name: GitHub
- variant: outline
- to: https://github.com/ZTL-UwU/shadcn-docs-nuxt
- leftIcon: 'lucide:github'
- ---
-
- #title
- Build your component library
-
- #description
- Beautifully designed components that you can copy and paste into your apps.
- ::
-
+ ```mdc
::hero-alt
---
announcement:
diff --git a/content/2.components/3.page/hero.md b/content/2.components/3.page/hero.md
index d9898b52..3ec67a13 100644
--- a/content/2.components/3.page/hero.md
+++ b/content/2.components/3.page/hero.md
@@ -8,8 +8,10 @@ badges:
target: _blank
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+## Usage
+
+::stack
+ ::div{class="p-4"}
::hero
---
announcement:
@@ -32,7 +34,7 @@ badges:
Beautifully designed Nuxt Content template with shadcn-vue. :br Customizable. Compatible. Open Source.
::
::
- ```mdc[Code]
+ ```mdc
::hero
---
announcement:
diff --git a/content/2.components/3.page/team-card.md b/content/2.components/3.page/team-card.md
index 98c89e9d..adf5a045 100644
--- a/content/2.components/3.page/team-card.md
+++ b/content/2.components/3.page/team-card.md
@@ -10,8 +10,8 @@ badges:
- value: 0.7.7
---
-::code-group
- ::div{label="Preview" class="md:p-4"}
+::stack
+ ::div{class="p-4"}
::team-card-group
::team-card
---
@@ -45,7 +45,7 @@ badges:
::
::
::
- ```mdc [Code]
+ ```mdc
::team-card-group
::team-card
---