shadcn-vue icon indicating copy to clipboard operation
shadcn-vue copied to clipboard

[Feature]: Add option for icons to the Auto Form inputs

Open koddr opened this issue 1 year ago • 0 comments
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:

screenshot

Additional information

  • [ ] I intend to submit a PR for this feature.
  • [ ] I have already implemented and/or tested this feature.

koddr avatar May 16 '24 06:05 koddr