Usage
The DashboardSearchButton component is used to open the DashboardSearch modal.
<template>
<B24DashboardSearchButton />
</template>
It extends the Button component, so you can pass any property such as color, size, etc.
<template>
<B24DashboardSearchButton color="air-primary-success" />
</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 hide the button's label and kbds. Defaults to false.
<template>
<B24DashboardSearchButton />
</template>
Kbds
Use the kbds prop to display keyboard keys in the button. Defaults to ['meta', 'K'] to match the default shortcut of the DashboardSearch component.
<template>
<B24DashboardSearchButton
:kbds="{
'0': 'alt',
'1': 'O'
}"
/>
</template>
API
Props
Slots
Theme
https://github.com/bitrix24/b24ui/tree/main/src/theme/dashboard-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'
}
}
}
}