shadcn-vue
shadcn-vue copied to clipboard
[Feature]: Add option for icons to the Auto Form inputs
trafficstars
Describe the feature
It would be great if it were possible to add Inputs with icons into the Auto Form component.
For example, as standalone option icon (like component or else):
<script setup lang="ts">
import { Search } from 'lucide-vue-next'
// ...
</script>
<template>
<AutoForm
:field-config="{
searchField: {
inputProps: {
type: 'text',
placeholder: 'Search...',
showLabel: false,
},
icon: {
position: 'left', // or 'right'
component: Search, // place imported icon component here
},
// ...
},
}"
/>
</template>
And result something like this:
Additional information
- [ ] I intend to submit a PR for this feature.
- [ ] I have already implemented and/or tested this feature.