Nuxt UI v3 is officially released!

DashboardSearchButton

A pre-styled Button to open the DashboardSearch modal.

Usage

The Button is already styled and will render as an icon button if you unset the label. You can override all the Button props as it's the root component.

{
  "message": "You should use slots with <ContentRenderer>",
  "value": {},
  "excerpt": false,
  "tag": "div"
}

You can also do this by yourself using the useUIState composable:

<script setup lang="ts">
const { toggleDashboardSearch, isDashboardSearchModalOpen } = useUIState()
</script>

<template>
  <UButton label="Open" @click="toggleDashboardSearch" />
</template>

Props

label
string
"Search..."