v2.1.8
/
  • Get Started
  • Components
  • Composables
  • Typography
  • GitHub
  • Layout
  • App
  • Container
  • Error
  • SidebarLayout
  • Element
  • Advice
  • Alert
  • Avatar
  • AvatarGroup
  • Badge
  • Banner
  • Button
  • Calendar
  • Card
  • Chip
  • Collapsible
  • Countdown
  • FieldGroup
  • Kbd
  • Progress
  • Separator
  • Skeleton
  • Form
  • Checkbox
  • CheckboxGroup
  • ColorPicker
  • FileUpload
  • Form
  • FormField
  • Input
  • InputDate
  • InputMenu
  • InputNumber
  • InputTags
  • InputTime
  • PinInput
  • RadioGroup
  • Range
  • Select
  • SelectMenu
  • Switch
  • Textarea
  • Data
  • Accordion
  • DescriptionList
  • Empty
  • Table
  • TableWrapper
  • Timeline
  • User
  • Navigation
  • Breadcrumb
  • CommandPalette
  • Link
  • NavigationMenu
  • Pagination
  • Stepper
  • Tabs
  • Overlay
  • ContextMenu
  • DropdownMenu
  • Modal
  • Popover
  • Slideover
  • Toast
  • Tooltip
  • Page
  • PageCard
  • PageColumns
  • PageGrid
  • PageLinks
  • PageList
  • Dashboard
  • DashboardGroup
  • DashboardSearch
  • DashboardSearchButton
  • AI Chat
  • soonChatMessage
  • soonChatMessages
  • soonChatPalette
  • soonChatPrompt
  • soonChatPromptSubmit
  • Content
  • ContentSearch
  • ContentSearchButton
  • ContentSurround
  • ContentToc
  • Color Mode
  • ColorModeAvatar
  • ColorModeButton
  • ColorModeImage
  • ColorModeSelect
  • ColorModeSwitch
  • i18n
  • LocaleSelect
  • b24icons
  • b24jssdk
Use our Nuxt starter
v2.1.8
  • Docs
  • Components
  • Composables
  • Typography

Separator

Divides content in a horizontal or vertical manner.
GitHub
Demo
Nuxt UI
SeparatorSeparator

Usage

Use the Separator component as-is to separate content.

{
  "wait": "Loading client-side content..."
}

Orientation

Use the orientation prop to change the orientation of the Separator. Defaults to horizontal.

{
  "wait": "Loading client-side content..."
}

Label

Use the label prop to display a label in the middle of the Separator.

Bitrix24 UI
{
  "wait": "Loading client-side content..."
}

Icon

Use the icon prop to display an Icon in the middle of the Separator.

{
  "wait": "Loading client-side content..."
}

Avatar

Use the avatar prop to display an Avatar in the middle of the Separator.

{
  "wait": "Loading client-side content..."
}

Accent

Use the accent prop to change the variant of the Separator. Defaults to default.

{
  "wait": "Loading client-side content..."
}

Type

Use the type prop to change the type of the Separator. Defaults to solid.

{
  "wait": "Loading client-side content..."
}

Size

Use the size prop to change the size of the Separator. Defaults to thin.

{
  "wait": "Loading client-side content..."
}

API

Props

Prop Default Type
as'div'any

The element or component this component should render as.

label string

Display a label in the middle.

iconIconComponent

Display an icon in the middle

avatar AvatarProps

Display an avatar in the middle

  • as?: any

    The element or component this component should render as. Defaults to 'span'.

  • src?: string
  • alt?: string
  • icon?: IconComponent

    Display an icon on the left side.

  • text?: string
  • size?: "sm" | "md" | "3xs" | "2xs" | "xs" | "lg" | "xl" | "2xl" | "3xl"

    Defaults to 'md'.

  • chip?: boolean | ChipProps
  • class?: any
  • style?: any
  • b24ui?: { root?: ClassNameValue; image?: ClassNameValue; fallback?: ClassNameValue; icon?: ClassNameValue; }
  • crossorigin?: "" | "anonymous" | "use-credentials"
  • decoding?: "async" | "auto" | "sync"
  • height?: Numberish
  • loading?: "lazy" | "eager"
  • referrerpolicy?: HTMLAttributeReferrerPolicy
  • sizes?: string
  • srcset?: string
  • usemap?: string
  • width?: Numberish
accent'default' "default" | "accent" | "less"
size'thin' "thin" | "thick"
type'solid' "solid" | "double" | "dashed" | "dotted"
orientation'horizontal' "horizontal" | "vertical"

The orientation of the separator.

decorativeboolean

Whether or not the component is purely decorative.
When true, accessibility-related attributes are updated so that that the rendered element is removed from the accessibility tree.

b24ui { root?: ClassNameValue; border?: ClassNameValue; container?: ClassNameValue; icon?: ClassNameValue; avatar?: ClassNameValue; avatarSize?: ClassNameValue; label?: ClassNameValue; }

Slots

Slot Type
default{ b24ui: object; }

Theme

app.config.ts
export default defineAppConfig({
  b24ui: {
    separator: {
      slots: {
        root: 'flex items-center align-center text-center',
        border: '',
        container: 'font-[family-name:var(--ui-font-family-primary)] font-(--ui-font-weight-normal) flex',
        icon: 'shrink-0 size-7',
        avatar: 'shrink-0',
        avatarSize: 'sm',
        label: ''
      },
      variants: {
        accent: {
          default: {
            container: 'text-(--ui-color-design-plain-na-content-secondary) text-(length:--ui-font-size-sm)/(--ui-font-line-height-reset)',
            border: 'border-(--ui-color-divider-vibrant-default)'
          },
          accent: {
            container: 'text-(--b24ui-typography-description-color) text-(length:--ui-font-size-sm)/(--ui-font-line-height-reset)',
            border: 'border-(--ui-color-divider-vibrant-accent-more)'
          },
          less: {
            container: 'text-(--ui-color-base-6) text-(length:--ui-font-size-sm)/(--ui-font-line-height-reset)',
            border: 'border-(--ui-color-divider-vibrant-less)'
          }
        },
        orientation: {
          horizontal: {
            root: 'w-full flex-row',
            border: 'w-full',
            container: 'mx-3 whitespace-nowrap'
          },
          vertical: {
            root: 'h-full flex-col',
            border: 'h-full',
            container: 'my-2'
          }
        },
        size: {
          thin: '',
          thick: ''
        },
        type: {
          solid: {
            border: 'border-solid'
          },
          dashed: {
            border: 'border-dashed'
          },
          dotted: {
            border: 'border-dotted'
          },
          double: {
            border: 'border-double'
          }
        }
      },
      compoundVariants: [
        {
          orientation: 'horizontal',
          size: 'thin',
          class: {
            border: 'border-t-(length:--ui-border-width-thin)'
          }
        },
        {
          orientation: 'horizontal',
          size: 'thick',
          class: {
            border: 'border-t-(length:--ui-border-width-thick)'
          }
        },
        {
          orientation: 'vertical',
          size: 'thin',
          class: {
            border: 'border-s-(length:--ui-border-width-thin)'
          }
        },
        {
          orientation: 'vertical',
          size: 'thick',
          class: {
            border: 'border-s-(length:--ui-border-width-thick)'
          }
        },
        {
          type: 'double',
          size: 'thick',
          orientation: 'horizontal',
          class: {
            border: 'border-t-[length:calc(var(--ui-border-width-thick)_+_1px)]'
          }
        },
        {
          type: 'double',
          size: 'thick',
          orientation: 'vertical',
          class: {
            border: 'border-s-[length:calc(var(--ui-border-width-thick)_+_1px)]'
          }
        }
      ],
      defaultVariants: {
        accent: 'default',
        size: 'thin',
        type: 'solid'
      }
    }
  }
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import bitrix24UIPluginVite from '@bitrix24/b24ui-nuxt/vite'

export default defineConfig({
  plugins: [
    vue(),
    bitrix24UIPluginVite({
      b24ui: {
        separator: {
          slots: {
            root: 'flex items-center align-center text-center',
            border: '',
            container: 'font-[family-name:var(--ui-font-family-primary)] font-(--ui-font-weight-normal) flex',
            icon: 'shrink-0 size-7',
            avatar: 'shrink-0',
            avatarSize: 'sm',
            label: ''
          },
          variants: {
            accent: {
              default: {
                container: 'text-(--ui-color-design-plain-na-content-secondary) text-(length:--ui-font-size-sm)/(--ui-font-line-height-reset)',
                border: 'border-(--ui-color-divider-vibrant-default)'
              },
              accent: {
                container: 'text-(--b24ui-typography-description-color) text-(length:--ui-font-size-sm)/(--ui-font-line-height-reset)',
                border: 'border-(--ui-color-divider-vibrant-accent-more)'
              },
              less: {
                container: 'text-(--ui-color-base-6) text-(length:--ui-font-size-sm)/(--ui-font-line-height-reset)',
                border: 'border-(--ui-color-divider-vibrant-less)'
              }
            },
            orientation: {
              horizontal: {
                root: 'w-full flex-row',
                border: 'w-full',
                container: 'mx-3 whitespace-nowrap'
              },
              vertical: {
                root: 'h-full flex-col',
                border: 'h-full',
                container: 'my-2'
              }
            },
            size: {
              thin: '',
              thick: ''
            },
            type: {
              solid: {
                border: 'border-solid'
              },
              dashed: {
                border: 'border-dashed'
              },
              dotted: {
                border: 'border-dotted'
              },
              double: {
                border: 'border-double'
              }
            }
          },
          compoundVariants: [
            {
              orientation: 'horizontal',
              size: 'thin',
              class: {
                border: 'border-t-(length:--ui-border-width-thin)'
              }
            },
            {
              orientation: 'horizontal',
              size: 'thick',
              class: {
                border: 'border-t-(length:--ui-border-width-thick)'
              }
            },
            {
              orientation: 'vertical',
              size: 'thin',
              class: {
                border: 'border-s-(length:--ui-border-width-thin)'
              }
            },
            {
              orientation: 'vertical',
              size: 'thick',
              class: {
                border: 'border-s-(length:--ui-border-width-thick)'
              }
            },
            {
              type: 'double',
              size: 'thick',
              orientation: 'horizontal',
              class: {
                border: 'border-t-[length:calc(var(--ui-border-width-thick)_+_1px)]'
              }
            },
            {
              type: 'double',
              size: 'thick',
              orientation: 'vertical',
              class: {
                border: 'border-s-[length:calc(var(--ui-border-width-thick)_+_1px)]'
              }
            }
          ],
          defaultVariants: {
            accent: 'default',
            size: 'thin',
            type: 'solid'
          }
        }
      }
    })
  ]
})

Progress

A progress bar displaying task completion status.

Skeleton

A toggle control for switching between two states.

On this page

  • Usage
    • Orientation
    • Label
    • Icon
    • Avatar
    • Accent
    • Type
    • Size
  • API
    • Props
    • Slots
  • Theme
Releases
Published under MIT License.

Copyright © 2024-present Bitrix24