Components
More complex premade components to enhance your documentation with interactive and structured content.
Accordion
Create expandable content sections for better information organization. Use the accordion and accordion-item components to display an Accordion in your content.
Yes! Yaplet has a free plan with 50 free AI answers per month.
Yes! Check out the pricing here: Pricing
The free plan has a limit of 50 free AI answers per month. The paid plans have no limits and include additional features.
::accordion
---
defaultValue:
- '1'
---
::accordion-item{label="Does Yaplet have a free plan?" icon="i-lucide-circle-help"}
Yes! Yaplet has a free plan with 50 free AI answers per month.
::
::accordion-item{label="Can I upgrade to a paid plan?" icon="i-lucide-circle-help"}
Yes! Check out the pricing here: [Pricing](/pricing)
::
::accordion-item{label="What is the difference between the free and paid plans?" icon="i-lucide-circle-help"}
The free plan has a limit of 50 free AI answers per month. The paid plans have no limits and include additional features.
::
::
| Prop | Default | Type |
|---|---|---|
type | 'multiple' | "multiple" | "single" |
ui | { root?: ClassNameValue; trigger?: ClassNameValue; } & { root?: ClassNameValue; item?: ClassNameValue; header?: ClassNameValue; trigger?: ClassNameValue; content?: ClassNameValue; body?: ClassNameValue; leadingIcon?: ClassNameValue; trailingIcon?: ClassNameValue; label?: ClassNameValue; } |
Badge
Display version numbers, status labels, and tags within your content. Use markdown in the default slot of the badge component to display a Badge in your content.
::badge
**v4.0.0**
::
Callout
Highlight important information with eye-catching colored boxes and icons.
Use markdown in the default slot of the callout component to add eye-catching context to your content. Use the icon and color props to customize it.
::callout{icon="i-lucide-square-play" color="neutral" to="/pricing"}
This is a `callout` with full **markdown** support.
::
Shortcuts
::note
Here's some additional information.
::
::tip
Here's a helpful suggestion.
::
::warning
Be careful with this action as it might have unexpected results.
::
::caution
This action cannot be undone.
::
| Prop | Default | Type |
|---|---|---|
to | string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric | |
target | null | "_blank" | "_parent" | "_self" | "_top" | string & {} | |
icon | any | |
color | 'neutral' | "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" |
ui | { base?: ClassNameValue; icon?: ClassNameValue; externalIcon?: ClassNameValue; } |
Card
Create highlighted content blocks with optional links and navigation. Use markdown in the default slot of the card component to highlight your content. Use the title, icon and color props to customize it.
::card{title="Live Chat" icon="i-lucide-message-circle" color="primary" to="/live-chat"}
Best suited for real-time customer support and instant communication with your visitors.
::
| Prop | Default | Type |
|---|---|---|
as | any | |
variant | "solid" | "outline" | "soft" | "subtle" | undefined | |
title | string | undefined | |
icon | any | |
color | 'primary' | "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" |
to | string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric | |
target | null | "_blank" | "_parent" | "_self" | "_top" | string & {} | |
ui | { root?: ClassNameValue; header?: ClassNameValue; body?: ClassNameValue; footer?: ClassNameValue; } |
CardGroup
Organize multiple cards in responsive grid layouts for better content presentation. Wrap your card components with the card-group component to group them together in a grid layout.
::card-group
::card{icon="i-lucide-message-circle" title="Live Chat" to="/live-chat" target="_blank"}
Real-time customer support and instant communication.
::
::card{icon="i-lucide-bot" title="AI Chatbot" to="/custom-bots" target="_blank"}
Automated responses powered by AI to handle common questions.
::
::card{icon="i-lucide-book-open" title="Knowledge Base" to="/knowledge-base" target="_blank"}
Self-service documentation and help articles for your customers.
::
::card{icon="i-lucide-zap" title="Automation" to="/automated-marketing" target="_blank"}
Workflow automation and marketing campaigns.
::
::
CodeCollapse
Make long code blocks collapsible to save space and improve readability. Wrap your code-block with a code-collapse component to display a collapsible code block.
@import "tailwindcss";
@theme static {
--font-sans: 'Public Sans', sans-serif;
--breakpoint-3xl: 1920px;
--color-green-50: #EFFDF5;
--color-green-100: #D9FBE8;
--color-green-200: #B3F5D1;
--color-green-300: #75EDAE;
--color-green-400: #00DC82;
--color-green-500: #00C16A;
--color-green-600: #00A155;
--color-green-700: #007F45;
--color-green-800: #016538;
--color-green-900: #0A5331;
--color-green-950: #052E16;
}
::code-collapse
```css [main.css]
@import "tailwindcss";
@theme static {
--font-sans: 'Public Sans', sans-serif;
--breakpoint-3xl: 1920px;
--color-green-50: #EFFDF5;
--color-green-100: #D9FBE8;
--color-green-200: #B3F5D1;
--color-green-300: #75EDAE;
--color-green-400: #00DC82;
--color-green-500: #00C16A;
--color-green-600: #00A155;
--color-green-700: #007F45;
--color-green-800: #016538;
--color-green-900: #0A5331;
--color-green-950: #052E16;
}
```
::
| Prop | Default | Type |
|---|---|---|
icon | any {lang="ts-type"} | |
name | string | undefined | |
openText | string | undefined | |
closeText | string | undefined | |
open | false | boolean | undefined |
ui | { root?: ClassNameValue; footer?: ClassNameValue; trigger?: ClassNameValue; triggerIcon?: ClassNameValue; } |
CodeGroup
Group multiple code examples in tabbed interfaces for easy comparison. Wrap your code blocks around a code-group component to group them together in tabs.
pnpm add @yaplet/sdk
yarn add @yaplet/sdk
npm install @yaplet/sdk
::code-group
```bash [pnpm]
pnpm add @yaplet/sdk
```
```bash [yarn]
yarn add @yaplet/sdk
```
```bash [npm]
npm install @yaplet/sdk
```
::
| Prop | Default | Type |
|---|---|---|
defaultValue | "0" | string | undefined |
sync | string | undefined | |
modelValue | string | undefined | |
ui | { root?: ClassNameValue; list?: ClassNameValue; indicator?: ClassNameValue; trigger?: ClassNameValue; triggerIcon?: ClassNameValue; triggerLabel?: ClassNameValue; } |
CodePreview
Display code examples with a preview and their source for clearer documentation. Wrap any content with the code-preview component to display a live preview alongside its source code using the code slot.
inline code
`inline code`
::code-preview
`inline code`
#code
```mdc
`inline code`
```
::
| Prop | Default | Type |
|---|---|---|
ui | { root?: ClassNameValue; preview?: ClassNameValue; code?: ClassNameValue; } |
CodeTree
Visualize file and folder structures with syntax-highlighted code. Wrap your code blocks with a code-tree component in any particular order to display a tree view of your files.
export default defineAppConfig({
ui: {
colors: {
primary: 'green'
}
}
})
::code-tree{defaultValue="app/app.config.ts"}
```ts [nuxt.config.ts]
export default defineNuxtConfig({
modules: ['@nuxt/ui'],
css: ['~/assets/css/main.css']
})
```
```css [app/assets/css/main.css]
@import "tailwindcss";
@import "@nuxt/ui";
```
```ts [app/app.config.ts]
export default defineAppConfig({
ui: {
colors: {
primary: 'green'
}
}
})
```
```vue [app/app.vue]
<template>
<UApp>
<NuxtPage />
</UApp>
</template>
```
```json [package.json]
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"typecheck": "nuxt typecheck"
},
"dependencies": {
"@iconify-json/lucide": "^1.2.18",
"@nuxt/ui": "^4.0.0",
"nuxt": "^4.0.0"
},
"devDependencies": {
"typescript": "^5.8.2",
"vue-tsc": "^2.2.10"
}
}
```
::
| Prop | Default | Type |
|---|---|---|
defaultValue | string | undefined | |
expandAll | false | boolean | undefined |
ui | { root?: ClassNameValue; list?: ClassNameValue; item?: ClassNameValue; listWithChildren?: ClassNameValue; itemWithChildren?: ClassNameValue; link?: ClassNameValue; linkLeadingIcon?: ClassNameValue; linkLabel?: ClassNameValue; linkTrailing?: ClassNameValue; linkTrailingIcon?: ClassNameValue; content?: ClassNameValue; } |
Collapsible
Toggle content visibility with smooth expand and collapse animations. Wrap your content with the collapsible component to display a Collapsible in your content.
| Prop | Default | Type |
|---|---|---|
name | string | |
size | md | string |
color | neutral | string |
::collapsible
| Prop | Default | Type |
|---------|-----------|--------------------------|
| `name` | | `string`{lang="ts-type"} |
| `size` | `md` | `string`{lang="ts-type"} |
| `color` | `neutral` | `string`{lang="ts-type"} |
::
| Prop | Default | Type |
|---|---|---|
as | any | |
disabled | boolean | undefined | |
defaultOpen | boolean | undefined | |
open | boolean | undefined | |
unmountOnHide | true | boolean | undefined |
ui | { root?: ClassNameValue; content?: ClassNameValue; } |
Field
Document API parameters, props, and configuration options clearly. A field, prop or parameter to display in your content.
description can be set as prop or in the default slot with full markdown support.::field{name="apiKey" type="string" required}
The `description` can be set as prop or in the default slot with full **markdown** support.
::
| Prop | Default | Type |
|---|---|---|
as | any | |
name | string | undefined | |
type | string | undefined | |
description | string | undefined | |
required | boolean | undefined | |
ui | { root?: ClassNameValue; container?: ClassNameValue; name?: ClassNameValue; wrapper?: ClassNameValue; required?: ClassNameValue; type?: ClassNameValue; description?: ClassNameValue; } |
FieldGroup
Group related fields together for comprehensive API documentation. Group fields together in a list.
false - Enables analytics for your project.false - Enables storage to store static assets, such as images, videos and more.false - Enables cache storage to cache your server route responses.false - Enables SQL database to store your application's data.::field-group
::field{name="analytics" type="boolean"}
Default to `false` - Enables analytics for your project.
::
::field{name="storage" type="boolean"}
Default to `false` - Enables storage to store static assets, such as images, videos and more.
::
::field{name="cache" type="boolean"}
Default to `false` - Enables cache storage to cache your server route responses.
::
::field{name="database" type="boolean"}
Default to `false` - Enables SQL database to store your application's data.
::
::
| Prop | Default | Type |
|---|---|---|
as | any | |
size | "md" | "xs" | "sm" | "lg" | "xl" | undefined | |
orientation | "horizontal" | "horizontal" | "vertical" | undefined |
ui | {} |
Icon
Display icons from popular icon libraries to enhance your content Iconify. Use the icon component to display an Icon in your content.
::icon{name="i-lucide-message-circle"}
| Prop | Default | Type |
|---|---|---|
name | any | |
mode | "svg" | "css" | undefined | |
size | string | number | undefined | |
customize | ((content: string, name?: string | undefined, prefix?: string | undefined, provider?: string | undefined) => string) | undefined |
Kbd
Display keyboard shortcuts and key combinations with proper styling. Use the kbd component to display a Kbd in your content.
K
:kbd{value="meta"} :kbd{value="K"}
| Prop | Default | Type |
|---|---|---|
as | "kbd" | any |
value | string | undefined | |
color | "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined | |
variant | "outline" | "soft" | "subtle" | "solid" | undefined | |
size | "sm" | "md" | "lg" | undefined |
Steps
Transform headings into numbered step-by-step guides and tutorials. Wrap your headings with the Steps component to display a list of steps. Use the level prop to define which heading will be used for the steps.
Add the Nuxt UI module in your nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxt/ui']
})
Import Tailwind CSS in your CSS
@import "tailwindcss";
Start your development server
npm run dev
::steps{level="4"}
#### Add the Nuxt UI module in your `nuxt.config.ts`
```ts [nuxt.config.ts]
export default defineNuxtConfig({
modules: ['@nuxt/ui']
})
```
#### Import Tailwind CSS in your CSS
```css [assets/css/main.css]
@import "tailwindcss";
```
#### Start your development server
```bash
npm run dev
```
::
| Prop | Default | Type |
|---|---|---|
level | "3" | "2" | "4" | undefined |
Tabs
Organize related content in interactive tabbed interfaces. Use the tabs and tabs-item components to display Tabs in your content.
::callout
This is a callout with full markdown support.
::
::tabs
:::tabs-item{label="Code" icon="i-lucide-code"}
```mdc
::callout
This is a callout with full markdown support.
::
```
:::
:::tabs-item{label="Preview" icon="i-lucide-eye"}
::callout
This is a callout with full markdown support.
::
:::
::
| Prop | Default | Type |
|---|---|---|
as | any | |
items | TabsItem[] | undefined | |
color | "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" | undefined | |
variant | "pill" | "link" | undefined | |
size | "sm" | "xs" | "md" | "lg" | "xl" | undefined | |
orientation | "horizontal" | DataOrientation | undefined |
content | true | boolean | undefined |
labelKey | "label" | GetItemKeys<TabsItem> | undefined |
defaultValue | "0" | string | number | undefined |
modelValue | string | number | undefined | |
activationMode | "automatic" | "manual" | undefined | |
unmountOnHide | true | boolean | undefined |
ui | { root?: ClassNameValue; list?: ClassNameValue; indicator?: ClassNameValue; trigger?: ClassNameValue; leadingIcon?: ClassNameValue; leadingAvatar?: ClassNameValue; leadingAvatarSize?: ClassNameValue; label?: ClassNameValue; trailingBadge?: ClassNameValue; trailingBadgeSize?: ClassNameValue; content?: ClassNameValue; } |