Usage
The ContentSearchButton component is used to open the ContentSearch modal.
<template>
<UContentSearchButton />
</template>
It extends the Button component, so you can pass any property such as color
, variant
, size
, etc.
<template>
<UContentSearchButton label="Search..." variant="subtle" />
</template>
The button defaults to
color="neutral"
and variant="ghost"
.API
Props
Prop | Default | Type |
---|---|---|
as |
|
The element or component this component should render as when not a link. |
icon |
|
The icon displayed in the button. |
label |
| |
color |
|
|
variant |
|
|
size |
| |
disabled |
| |
ui |
|
Slots
Slot | Type |
---|---|
leading |
|
default |
|
trailing |
|
Theme
app.config.ts
export default defineAppConfig({
uiPro: {
contentSearchButton: {
base: ''
}
}
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nuxt/ui/vite'
export default defineConfig({
plugins: [
vue(),
ui({
uiPro: {
contentSearchButton: {
base: ''
}
}
})
]
})