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! Check out the pricing here: Pricing

::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.
::

::
PropDefaultType
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.

v4.0.0
::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.

This is a callout with full markdown support.
::callout{icon="i-lucide-square-play" color="neutral" to="/pricing"}
This is a `callout` with full **markdown** support.
::

Shortcuts

Here's some additional information.
Here's a helpful suggestion.
Be careful with this action as it might have unexpected results.
This action cannot be undone.
::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.
::

PropDefaultType
tostring | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric
targetnull | "_blank" | "_parent" | "_self" | "_top" | string & {}
iconany
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.

Live Chat

Best suited for real-time customer support and instant communication with your visitors.

::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.
::
PropDefaultType
asany
variant"solid" | "outline" | "soft" | "subtle" | undefined
titlestring | undefined
iconany
color'primary'"error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral"
tostring | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric
targetnull | "_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.

Live Chat

Real-time customer support and instant communication.

AI Chatbot

Automated responses powered by AI to handle common questions.

Knowledge Base

Self-service documentation and help articles for your customers.

Automation

Workflow automation and marketing campaigns.

::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.

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;
}
::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;
}
```

::
PropDefaultType
iconany {lang="ts-type"}
namestring | undefined
openTextstring | undefined
closeTextstring | undefined
openfalseboolean | 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
::code-group

```bash [pnpm]
pnpm add @yaplet/sdk
```

```bash [yarn]
yarn add @yaplet/sdk
```

```bash [npm]
npm install @yaplet/sdk
```

::
PropDefaultType
defaultValue"0"string | undefined
syncstring | undefined
modelValuestring | 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`
```
::
PropDefaultType
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.

app/app.config.ts
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"
  }
}
```
::
PropDefaultType
defaultValuestring | undefined
expandAllfalseboolean | 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.

::collapsible
| Prop    | Default   | Type                     |
|---------|-----------|--------------------------|
| `name`  |           | `string`{lang="ts-type"} |
| `size`  | `md`      | `string`{lang="ts-type"} |
| `color` | `neutral` | `string`{lang="ts-type"} |
::
PropDefaultType
asany
disabledboolean | undefined
defaultOpenboolean | undefined
openboolean | undefined
unmountOnHidetrueboolean | 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.

apiKey
string required
The 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.
::
PropDefaultType
asany
namestring | undefined
typestring | undefined
descriptionstring | undefined
requiredboolean | 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.

analytics
boolean
Default to false - Enables analytics for your project.
storage
boolean
Default to false - Enables storage to store static assets, such as images, videos and more.
cache
boolean
Default to false - Enables cache storage to cache your server route responses.
database
boolean
Default to 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.
::
::
PropDefaultType
asany
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"}
PropDefaultType
nameany
mode"svg" | "css" | undefined
sizestring | 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"}
PropDefaultType
as"kbd"any
valuestring | 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

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui']
})

Import Tailwind CSS in your CSS

assets/css/main.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
```

::
PropDefaultType
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.
::
:::
::
PropDefaultType
asany
itemsTabsItem[] | 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
contenttrueboolean | undefined
labelKey"label"GetItemKeys<TabsItem> | undefined
defaultValue"0"string | number | undefined
modelValuestring | number | undefined
activationMode"automatic" | "manual" | undefined
unmountOnHidetrueboolean | undefined
ui{ root?: ClassNameValue; list?: ClassNameValue; indicator?: ClassNameValue; trigger?: ClassNameValue; leadingIcon?: ClassNameValue; leadingAvatar?: ClassNameValue; leadingAvatarSize?: ClassNameValue; label?: ClassNameValue; trailingBadge?: ClassNameValue; trailingBadgeSize?: ClassNameValue; content?: ClassNameValue; }