Usage
The ContentSearchButton component is used to open the ContentSearch modal.
{
"wait": "Loading client-side content..."
}It extends the Button component, so you can pass any property such as color, size, etc.
{
"wait": "Loading client-side content..."
}The button defaults to
color="air-secondary-no-accent" when not collapsed, variant="air-tertiary-no-accent" when collapsed.Collapsed
Use the collapsed prop to show the button's label and kbds. Defaults to true.
{
"wait": "Loading client-side content..."
}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.
{
"wait": "Loading client-side content..."
}API
Props
Slots
Theme
app.config.ts
export default defineAppConfig({
b24ui: {
contentSearchButton: {
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'
}
}
}
}
}
})
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: {
contentSearchButton: {
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'
}
}
}
}
}
})
]
})