Giter VIP home page Giter VIP logo

easy-daisy's Introduction

🤷‍♂️ 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 Name Type Default Value Description
asyncSearch Boolean false Enable asynchronous search.
clearable Boolean false Allow clearing the selection.
disabled Boolean false Disable the component.
errors Array [] Error messages to display.
label String '' Label for the component.
loading Boolean false Show loading indicator.
options Array [] The options to display.
placeholder String 'Select an option' Placeholder text for the input.
required Boolean false Make the field required.
requiredErrorMessage String 'This field is required' Error message for required field.
returnObject Boolean false Return the entire option object.
searchable Boolean true Enable search functionality.
searchPlaceholder String 'Type to search' Placeholder text for search.

Events

Event Name Description
search Emitted 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 Name Type Default Value Description
asyncSearch Boolean false Enable asynchronous search.
clearable Boolean false Allow clearing the selection.
disabled Boolean false Disable the component.
errors Array [] Error messages to display.
label String '' Label for the component.
loading Boolean false Show loading indicator.
options Array [] The options to display.
placeholder String 'Select options' Placeholder text for the input.
required Boolean false Make the field required.
requiredErrorMessage String 'This field is required' Error message for required field.
returnObject Boolean false Return the entire option object.
searchable Boolean true Enable search functionality.
searchPlaceholder String 'Type to search' Placeholder text for search.
unique Boolean true Ensure selected options are unique.

Events

Event Name Description
search Emitted 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 Name Type Default Value Description
clearable Boolean false Allow clearing the selection.
disabled Boolean false Disable the component.
errors Array [] Error messages to display.
label String '' Label for the component.
loading Boolean false Show loading indicator.
placeholder String 'Select options' Placeholder text for the input.
required Boolean false Make the field required.
requiredErrorMessage String 'This field is required' Error message for required field.
returnObject Boolean false Return the entire option object.
unique Boolean true Ensure selected options are unique.

Events

Event Name Description
search Emitted when the search query changes.

Made with ❤️ by MYCURE

easy-daisy's People

Contributors

jofftiquez avatar

Stargazers

Github's AdjobiPierre avatar Umer Tahir avatar Pouya Saadeghi avatar Efren James Centeno avatar

Forkers

andronov04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.