---
title: "FooterColumns"
description: "Набор колонок со ссылками для навигации и информации в подвале."
canonical_url: "https://b24-ui.bx-shef.by/docs/components/footer-columns"
---
# FooterColumns

> Набор колонок со ссылками для навигации и информации в подвале.

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

Компонент FooterColumns отрисовывает список колонок для вашего Footer.

Используйте его в слоте `top` компонента [Footer](https://b24-ui.bx-shef.by/raw/docs/components/footer.md):

```vue
<template>
  <B24Footer>
    <template #top>
      <B24Container>
        <B24FooterColumns />
      </B24Container>
    </template>
  </B24Footer>
</template>
```

### Колонки

Пропс `columns` — массив объектов со свойствами:

- `label: string`
- `children?: FooterColumnLink[]`

Каждая колонка содержит массив `children` с объектами-ссылками. У ссылки могут быть свойства:

- `label?: string`
- `icon?: IconComponent`
- `class?: any`
- `b24ui?: { item?: ClassNameValue, link?: ClassNameValue, linkLabel?: ClassNameValue, linkLabelExternalIcon?: ClassNameValue, linkLeadingIcon?: ClassNameValue }`

Можно передать любое свойство компонента [Link](https://b24-ui.bx-shef.by/raw/docs/components/link.md#props), например `to`, `target` и другие.

```vue [FooterColumnsExample.vue]
<script setup lang="ts">
import type { FooterColumn } from '@bxshefby/b24ui-nuxt'
import GitHubIcon from '@bitrix24/b24icons-vue/social/GitHubIcon'

const columns: FooterColumn[] = [
  {
    label: 'Сообщество',
    children: [
      {
        label: 'Bitrix24 на GitHub',
        to: 'https://github.com/bitrix24',
        icon: GitHubIcon,
        target: '_blank'
      }
    ]
  },
  {
    label: 'Решения',
    children: [
      {
        label: 'Bitrix24 JsSdk',
        to: 'https://bitrix24.github.io/b24jssdk/',
        target: '_blank'
      },
      {
        label: 'Иконки Bitrix24',
        to: 'https://bitrix24.github.io/b24icons/',
        target: '_blank'
      },
      {
        label: 'Bitrix24 UI',
        to: 'https://bitrix24.github.io/b24ui/',
        target: '_blank'
      }
    ]
  }
]
</script>

<template>
  <B24FooterColumns :columns="columns">
    <template #right>
      <B24FormField name="email" label="Подписаться на нашу рассылку" size="lg">
        <B24Input type="email" class="w-full">
          <template #trailing>
            <B24Button type="submit" size="xs" label="Подписаться" />
          </template>
        </B24Input>
      </B24FormField>
    </template>
  </B24FooterColumns>
</template>
```

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

## API

### Пропсы

```ts
/**
 * Props for the FooterColumns component
 */
interface FooterColumnsProps {
  /**
   * The element or component this component should render as.
   * @default 'nav'
   */
  as?: any;
  columns?: FooterColumn<T>[] | undefined;
  b24ui?: { root?: SlotClass; left?: SlotClass; center?: SlotClass; right?: SlotClass; label?: SlotClass; list?: SlotClass; item?: SlotClass; link?: SlotClass; linkLeadingIcon?: SlotClass; linkLabel?: SlotClass; linkLabelExternalIcon?: SlotClass; } | undefined;
}
```

### Слоты

```ts
/**
 * Slots for the FooterColumns component
 */
interface FooterColumnsSlots {
  left(): any;
  default(): any;
  right(): any;
  column-label(): any;
  link(): any;
  link-leading(): any;
  link-label(): any;
  link-trailing(): any;
}
```

## Тема

```ts [app.config.ts]
export default defineAppConfig({
  b24ui: {
    footerColumns: {
      slots: {
        root: 'xl:grid xl:grid-cols-3 xl:gap-8',
        left: 'mb-10 xl:mb-0',
        center: 'flex flex-col lg:grid grid-flow-col auto-cols-fr gap-8 xl:col-span-2',
        right: 'mt-10 xl:mt-0',
        label: 'text-(length:--ui-font-size-lg)/[normal] font-(--ui-font-weight-semi-bold)',
        list: 'mt-6 space-y-4',
        item: 'relative',
        link: 'group text-sm flex items-center gap-1.5 focus-visible:outline-1 focus-visible:outline-(--ui-color-design-outline-focused-stroke)',
        linkLeadingIcon: 'size-5 shrink-0',
        linkLabel: 'truncate',
        linkLabelExternalIcon: 'inline-block size-[14px] text-(--ui-color-design-plain-content-icon-secondary)'
      },
      variants: {
        active: {
          true: {
            link: 'text-primary font-medium'
          },
          false: {
            link: 'text-description hover:text-label transition-colors'
          }
        }
      }
    }
  }
})
```

## Sitemap

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