---
title: "PageFeature"
description: "Компонент для показа основных возможностей вашего приложения."
canonical_url: "https://b24-ui.bx-shef.by/docs/components/page-feature"
---
# PageFeature

> Компонент для показа основных возможностей вашего приложения.

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

Компонент PageFeature используется компонентом [PageSection](https://b24-ui.bx-shef.by/raw/docs/components/page-section.md) для показа [возможностей](https://b24-ui.bx-shef.by/raw/docs/components/page-section.md#features).

### Заголовок

Пропс `title` задаёт заголовок возможности.

```vue
<template>
  <B24PageFeature title="Тема" />
</template>
```

> [!TIP]
> Заголовок по умолчанию отрисовывается как `div`. Чтобы отрисовать его как заголовок, передайте в пропс `as` объект, например `:as="{ title: 'h3' }"`. Корневой элемент задаётся так же: `:as="{ root: 'section', title: 'h3' }"`.

### Описание

Пропс `description` задаёт описание возможности.

```vue
<template>
  <B24PageFeature title="Тема" description="Настройте Bitrix24 UI." />
</template>
```

### Иконка

Пропс `icon` задаёт иконку возможности.

```vue
<script setup lang="ts">
import RocketIcon from '@bitrix24/b24icons-vue/main/RocketIcon'
</script>

<template>
  <B24PageFeature title="Тема" description="Настройте Bitrix24 UI." :icon="RocketIcon" />
</template>
```

### Ссылка

Можно передать любое свойство компонента [`<NuxtLink>`](https://nuxt.com/docs/api/components/nuxt-link), например `to`, `target`, `rel` и другие.

```vue
<script setup lang="ts">
import RocketIcon from '@bitrix24/b24icons-vue/main/RocketIcon'
</script>

<template>
  <B24PageFeature title="Тема" description="Настройте Bitrix24 UI." :icon="RocketIcon" to="/docs/getting-started/theme/design-system/" target="_blank" />
</template>
```

### Ориентация

Пропс `orientation` меняет ориентацию возможности. По умолчанию `horizontal`.

```vue
<script setup lang="ts">
import RocketIcon from '@bitrix24/b24icons-vue/main/RocketIcon'
</script>

<template>
  <B24PageFeature orientation="vertical" title="Тема" description="Настройте Bitrix24 UI." :icon="RocketIcon" />
</template>
```

## API

### Пропсы

```ts
/**
 * Props for the PageFeature component
 */
interface PageFeatureProps {
  /**
   * The element or component this component should render as.
   * @default 'div'
   */
  as?: any;
  /**
   * The icon displayed next to the title when `orientation` is `horizontal` and above the title when `orientation` is `vertical`.
   */
  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;
  title?: string | undefined;
  description?: string | undefined;
  /**
   * The orientation of the page feature.
   * @default 'horizontal'
   */
  orientation?: "horizontal" | "vertical" | undefined;
  to?: string | J | W | undefined;
  target?: null | "_blank" | "_parent" | "_self" | "_top" | string & {} | undefined;
  onClick?: (event: MouseEvent): void | undefined;
  b24ui?: { root?: SlotClass; wrapper?: SlotClass; leading?: SlotClass; leadingIcon?: SlotClass; title?: SlotClass; description?: SlotClass; } | undefined;
}
```

### Слоты

```ts
/**
 * Slots for the PageFeature component
 */
interface PageFeatureSlots {
  leading(): any;
  title(): any;
  description(): any;
  default(): any;
}
```

## Тема

```ts [app.config.ts]
export default defineAppConfig({
  b24ui: {
    pageFeature: {
      slots: {
        root: 'relative rounded-sm',
        wrapper: '',
        leading: 'inline-flex items-center justify-center',
        leadingIcon: 'size-5 shrink-0 text-(--ui-color-accent-main-primary)',
        title: 'text-(length:--ui-font-size-md) text-pretty font-(--ui-font-weight-semi-bold) text-legend',
        description: 'text-(length:--ui-font-size-sm) text-pretty text-description'
      },
      variants: {
        orientation: {
          horizontal: {
            root: 'flex items-start gap-2.5',
            leading: 'p-0.5'
          },
          vertical: {
            leading: 'mb-2.5'
          }
        },
        to: {
          true: {
            root: 'has-focus-visible:ring-2 has-focus-visible:ring-(--ui-color-accent-soft-element-blue) transition'
          }
        },
        title: {
          true: {
            description: 'mt-1'
          }
        }
      }
    }
  }
})
```

## Sitemap

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