Files
heroui-vue/apps/docs/demos/search-field-custom-icons.vue
T
2026-10-22 08:46:02 +08:00

31 lines
845 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import {
SearchFieldClearButton,
SearchFieldSearchIcon,
SearchFieldGroup,
SearchFieldInput,
SearchField,
Label,
Description,
} from "@heroui-vue/components";
import { IconFilter, IconCircleX } from "@tabler/icons-vue";
</script>
<template>
<div class="flex flex-col gap-4">
<SearchField name="search-custom">
<Label>搜索(自定义图标)</Label>
<SearchFieldGroup>
<SearchFieldSearchIcon>
<IconFilter aria-hidden="true" />
</SearchFieldSearchIcon>
<SearchFieldInput class="w-[280px]" placeholder="搜索…" />
<SearchFieldClearButton>
<IconCircleX aria-hidden="true" />
</SearchFieldClearButton>
</SearchFieldGroup>
<Description>自定义图标子元素</Description>
</SearchField>
</div>
</template>