---
title: "ProsePrompt"
description: "Готовые AI-промпты с копированием в один клик и интеграцией с IDE."
canonical_url: "https://b24-ui.bx-shef.by/docs/typography/prompt"
---
# ProsePrompt

> Готовые AI-промпты с копированием в один клик и интеграцией с IDE.

## Использование

Компонент `prompt` показывает готовый AI-промпт, который пользователь может скопировать в буфер обмена или открыть прямо в IDE.

### Prompt `2.15+`

Пропс `prompt` задаёт копируемый текст, а пропс `description` — видимую подпись.

````vue
```mdc
::prosePrompt{description="Build a dashboard layout with Bitrix24 UI."}
---
prompt: |
 You are a Bitrix24 UI expert. Help me build a dashboard layout with a collapsible sidebar and a sticky top navbar.

 Requirements:
 - Use `B24DashboardPanel`, `B24DashboardSidebar`, and `B24DashboardNavbar`
 - Use semantic color tokens like `bg-elevated` and `text-muted` for theming
 - The sidebar should include navigation links with icons using `B24NavigationMenu`
 - The navbar should display a search button, and a user dropdown menu
 - The layout must be fully responsive and collapse the sidebar on mobile
---
```
````

> [!NOTE]
> Промпт можно записать и в слоте по умолчанию. Тогда копируется его отрисованный текст, а блочные элементы превращаются в переносы строк; чтобы скопировать текст в точности как написан, используйте пропс `prompt`.

### Действия

Пропс `actions` показывает дополнительные кнопки. Кнопка `copy` показывается всегда. Доступные действия: `cursor`, `windsurf` и `claude`.

````vue
```mdc
::prosePrompt{description="Add a color mode toggle." actions="cursor,claude"}
---
prompt: |
 Add a color mode toggle to my Nuxt app.

 Requirements:
 - Use `useColorMode` from `'@bxshefby/b24ui-nuxt/composables` to manage the current mode
 - Render a `B24Button` with `color="air-tertiary"` that cycles between `light`, `dark`, and `system` on click
 - Update the button icon dynamically: `SunIconAir` for light, `MoonIconAir` for dark, `ScreenIcon` for system
 - Add a tooltip using `B24Tooltip` that shows the current active mode
---
```
````

## API

### Пропсы

```ts
/**
 * Props for the ProseProsePrompt component
 */
interface ProseProsePromptProps {
  description?: string | undefined;
  /**
   * The prompt to copy, kept as written.
   * The default slot is copied as plain text when not set.
   */
  prompt?: string | undefined;
  /**
   * Icon component to render. Pass an imported component, not a string;
   * for string names use `iconName` instead.
   */
  icon?: (props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Attrs; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, "expose">): any | undefined;
  /**
   * Resolved through the icon registry (`dictionary/iconRegistry.ts`)
   * with a fallback to short aliases (`dictionary/icons.ts`).
   * Ignored when `icon` is set.
   */
  iconName?: string | undefined;
  /**
   * The `copy` action is always displayed, list any additional actions to show alongside it.
   * @default []
   */
  actions?: ("copy" | "cursor" | "windsurf" | "claude")[] | undefined;
  b24ui?: { root?: SlotClass; icon?: SlotClass; content?: SlotClass; description?: SlotClass; actions?: SlotClass; } | undefined;
}
```

### Слоты

```ts
/**
 * Slots for the ProsePrompt component
 */
interface ProsePromptSlots {
  default(): any;
}
```

## Тема

```ts [app.config.ts]
export default defineAppConfig({
  b24ui: {
    prose: {}
  }
})
```

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
