Usage
The ContentSearchButton component is used to open the ContentSearch modal.
<template>
<B24ContentSearchButton />
</template>
It extends the Button component, so you can pass any property such as color, size, etc.
<template>
<B24ContentSearchButton color="air-primary" />
</template>
The button defaults to
color="air-secondary-no-accent" when not collapsed, color="air-tertiary-no-accent" when collapsed.Collapsed
Use the collapsed prop to show the button's label and kbds. Defaults to true.
<template>
<B24ContentSearchButton :collapsed="false" />
</template>
Kbds
Use the kbds prop to display keyboard keys in the button. Defaults to ['meta', 'K'] to match the default shortcut of the ContentSearch component.
<template>
<B24ContentSearchButton
:collapsed="false"
:kbds="{
'0': 'alt',
'1': 'O'
}"
/>
</template>
API
Props
Slots
Theme
https://github.com/bitrix24/b24ui/tree/main/src/theme/content/content-search-button.ts
export default {
slots: {
base: '',
baseLine: '',
label: '',
trailing: 'hidden lg:flex items-center gap-0.5 ms-auto'
},
variants: {
collapsed: {
true: {
baseLine: 'ps-[5px] pe-[5px]',
label: 'hidden',
trailing: 'lg:hidden'
}
}
}
}