0.0.5 • Published 1 year ago

@mycure/easy-daisy v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

🤷‍♂️ Easy Daisy 🌼

Vue.js 3 Component Collection for DaisyUI

Installation

npm install @mycure/easy-daisy

Usage

EasySelect

easy-select

Component

<script setup>
import { EasySelect } from '@mycure/easy-daisy';

const model = ref('Option 1');
const options = [
  {
    label: 'Option 1',
    value: 'Option 1',
  },
  {
    label: 'Option 2',
    value: 'Option 2',
  },
  {
    label: 'Option 3',
    value: 'Option 3',
  },
];

</script>

<template>
  <EasySelect v-model="model" :options="options" />

  <p>Selected: {{ model }}</p>
</template>

Props

Prop NameTypeDefault ValueDescription
asyncSearchBooleanfalseEnable asynchronous search.
clearableBooleanfalseAllow clearing the selection.
disabledBooleanfalseDisable the component.
errorsArray[]Error messages to display.
labelString''Label for the component.
loadingBooleanfalseShow loading indicator.
optionsArray[]The options to display.
placeholderString'Select an option'Placeholder text for the input.
requiredBooleanfalseMake the field required.
requiredErrorMessageString'This field is required'Error message for required field.
returnObjectBooleanfalseReturn the entire option object.
searchableBooleantrueEnable search functionality.
searchPlaceholderString'Type to search'Placeholder text for search.

Events

Event NameDescription
searchEmitted when the search query changes.

EasyMultipleSelect

easy-mutiple-select

Component

<script setup>
import { EasyMultipleSelect } from '@mycure/easy-daisy';

const model = ref(['Option 1']);

const options = [
  {
    label: 'Option 1',
    value: 'Option 1',
  },
  {
    label: 'Option 2',
    value: 'Option 2',
  },
  {
    label: 'Option 3',
    value: 'Option 3',
  },
];

</script>

<template>
  <EasyMultipleSelect v-model="model" :options="options" />
  <p>Selected: {{ model }}</p>
</template>

Props

Prop NameTypeDefault ValueDescription
asyncSearchBooleanfalseEnable asynchronous search.
clearableBooleanfalseAllow clearing the selection.
disabledBooleanfalseDisable the component.
errorsArray[]Error messages to display.
labelString''Label for the component.
loadingBooleanfalseShow loading indicator.
optionsArray[]The options to display.
placeholderString'Select options'Placeholder text for the input.
requiredBooleanfalseMake the field required.
requiredErrorMessageString'This field is required'Error message for required field.
returnObjectBooleanfalseReturn the entire option object.
searchableBooleantrueEnable search functionality.
searchPlaceholderString'Type to search'Placeholder text for search.
uniqueBooleantrueEnsure selected options are unique.

Events

Event NameDescription
searchEmitted when the search query changes.

EasyCombobox

easy-combo-box

Component

<script setup>
import { EasyCombobox } from '@mycure/easy-daisy';

const model = ref('Option 1');

const options = [
  {
    label: 'Option 1',
    value: 'Option 1',
  },
  {
    label: 'Option 2',
    value: 'Option 2',
  },
  {
    label: 'Option 3',
    value: 'Option 3',
  },
];
</script>

<template>
  <EasyCombobox v-model="model" :options="options" />
  <p>Selected: {{ model }}</p>
</template>

Props

Prop NameTypeDefault ValueDescription
clearableBooleanfalseAllow clearing the selection.
disabledBooleanfalseDisable the component.
errorsArray[]Error messages to display.
labelString''Label for the component.
loadingBooleanfalseShow loading indicator.
placeholderString'Select options'Placeholder text for the input.
requiredBooleanfalseMake the field required.
requiredErrorMessageString'This field is required'Error message for required field.
returnObjectBooleanfalseReturn the entire option object.
uniqueBooleantrueEnsure selected options are unique.

Events

Event NameDescription
searchEmitted when the search query changes.

Made with ❤️ by MYCURE

0.0.5

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago