diff --git a/components/content/CodeGroup.vue b/components/content/CodeGroup.vue
index 679466e2..1b6b1ca5 100644
--- a/components/content/CodeGroup.vue
+++ b/components/content/CodeGroup.vue
@@ -1,55 +1,13 @@
-
-
-
-
-
-
- {{ slot?.props?.filename }}
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/components/content/Preview.vue b/components/content/Preview.vue
deleted file mode 100644
index 096d091a..00000000
--- a/components/content/Preview.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
diff --git a/components/content/Tabs.vue b/components/content/Tabs.vue
index f366e241..a6a861ff 100644
--- a/components/content/Tabs.vue
+++ b/components/content/Tabs.vue
@@ -1,25 +1,94 @@
-
- {{ slot?.props?.label }}
+
+ {{ label(slot.props) }}
+
+
+
+
+
+
+
+ {{ label(slot.props) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content/1.getting-started/3.writing/2.components.md b/content/1.getting-started/3.writing/2.components.md
index a2557d89..fd0aeb56 100644
--- a/content/1.getting-started/3.writing/2.components.md
+++ b/content/1.getting-started/3.writing/2.components.md
@@ -13,7 +13,7 @@ The **Badges** under each component title marks the compatibility with other doc
:badge[Docus]{variant="outline" to="https://docus.dev/api/components#alert" target="_blank"}
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::alert{icon="lucide:info"}
An **default** alert with `code` and a [link](/).
::
@@ -78,14 +78,14 @@ The **Badges** under each component title marks the compatibility with other doc
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/callout" target="_blank"}
-`::callout` is an alias to `::alert`.
+`::callout`{language="mdc"} is an alias to `::alert`{language="mdc"}.
### Read More
:badge[undocs]{variant="outline" to="https://undocs.pages.dev/guide/components#read-more" target="_blank"}
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
:read-more{to="/getting-started/writing/markdown"}
:read-more{title="Nuxt website" to="https://nuxt.com/"}
::
@@ -101,7 +101,7 @@ The **Badges** under each component title marks the compatibility with other doc
:badge[Docus]{variant="outline" to="https://docus.dev/api/components#badge" target="_blank"}
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::badge
Default
::
@@ -140,7 +140,7 @@ The **Badges** under each component title marks the compatibility with other doc
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/code-group" target="_blank"}
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::code-group
```bash [npm]
npm run dev
@@ -158,16 +158,6 @@ The **Badges** under each component title marks the compatibility with other doc
bun run dev
```
::
-
- ::code-group
- ::preview{filename="Preview"}
- ### This is a header
- ::
-
- ```mdc [Code]
- ### This is a header
- ```
- ::
::
```mdc [Code]
@@ -188,26 +178,20 @@ The **Badges** under each component title marks the compatibility with other doc
bun run dev
```
::
-
- ::code-group
- ::preview{filename="Preview"}
- ### This is a header
- ::
-
- ```mdc [Code]
- ### This is a header
- ```
- ::
```
::
+::alert{to="/getting-started/writing/components#tabs"}
+`::code-group`{language="mdc"} is a wrapper around `::tabs{variant="card"}`{language="mdc"}.
+::
+
### Card
:badge[Docus]{variant="outline" to="https://docus.dev/api/components#card" target="_blank"}
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/card" target="_blank"}
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::card
#title
Card with slots
@@ -289,7 +273,7 @@ The **Badges** under each component title marks the compatibility with other doc
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/card-group" target="_blank"}
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::card-group
::card
---
@@ -380,7 +364,7 @@ The icon component uses **Nuxt Icon** under the hood. Check out the usage guide
::
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
:icon{name="lucide:box"}
@@ -410,7 +394,7 @@ npm i -D @iconify-json/collection-name
### Steps
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::steps
### Get Starter Template
@@ -515,7 +499,7 @@ npm i -D @iconify-json/collection-name
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/field" target="_blank"}
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::field{name="Field" type="string" required}
The `description` can be set as prop or in the default slot with full **markdown** support.
::
@@ -532,7 +516,7 @@ npm i -D @iconify-json/collection-name
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/field-group" target="_blank"}
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::field-group
::field{name="validate (path?: string, opts: { silent?: boolean })" type="Promise"}
Triggers form validation. Will raise any errors unless `opts.silent` is set to true.
@@ -578,7 +562,7 @@ npm i -D @iconify-json/collection-name
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/tabs" target="_blank"}
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::tabs
::div{label="PostgreSQL" icon="lucide:database"}
### PostgreSQL column types
@@ -620,6 +604,17 @@ npm i -D @iconify-json/collection-name
```
::
::
+ ::tabs{variant="card"}
+ ::div{label="Card Tab"}
+ ### This is a card-style tab
+ ::
+ ::div{label="Tab 2" icon="lucide:atom"}
+ This is Tab #2
+ ::
+ ```ts [Code Tab]
+ console.log('Hello World!');
+ ```
+ ::
::
```mdc [Code]
::tabs
@@ -663,6 +658,17 @@ npm i -D @iconify-json/collection-name
```
::
::
+ ::tabs{variant="card"}
+ ::div{label="Card Tab"}
+ ### This is a card-style tab
+ ::
+ ::div{label="Tab 2" icon="lucide:atom"}
+ This is Tab #2
+ ::
+ ```ts [Code Tab]
+ console.log('Hello World!');
+ ```
+ ::
```
::
@@ -671,7 +677,7 @@ npm i -D @iconify-json/collection-name
### Hero
::code-group
- ::preview{filename="Preview"}
+ ::div{label="Preview"}
::hero
---
announcement:
diff --git a/package.json b/package.json
index 30204037..53e4ae3f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "shadcn-docs-nuxt",
"type": "module",
- "version": "0.1.2",
+ "version": "0.1.3",
"author": "Tony Zhang ",
"license": "MIT",
"homepage": "https://shadcn-docs-nuxt.vercel.app/",