No description
  • Vue 72.9%
  • SCSS 13.1%
  • JavaScript 9.5%
  • HTML 4.5%
Find a file
2022-06-21 06:26:12 +01:00
public init 2022-06-19 19:54:45 +01:00
src Initial commit 2022-06-21 06:05:48 +01:00
.gitignore Update README, adjustments to build cmds 2022-06-21 06:26:12 +01:00
babel.config.js init 2022-06-19 19:54:45 +01:00
jsconfig.json init 2022-06-19 19:54:45 +01:00
package-lock.json Initial commit 2022-06-21 06:05:48 +01:00
package.json Update README, adjustments to build cmds 2022-06-21 06:26:12 +01:00
README.md Update README, adjustments to build cmds 2022-06-21 06:26:12 +01:00
vue.config.js init 2022-06-19 19:54:45 +01:00

vue-carousel-card-selector

Pass in an array items, this component will render some animated cards with a textbox. When user clicks on a card, it will select the item by emitting the selectItem event with the selected value. The textbox acts as a string-based filter, default filter function can be overriden.

See here for live demo.

See ./src/App.vue to see use of component in code.

See ./src/components/TopLevel.vue for (top-level) Vue component.

See ./src/helpers/defaultFilterFunct.js for default filter function.

Props

  • dataItems: Array of selectable items, as primitives or objects.
  • filterFunct: A function with the signature (dataItems, filterString): boolean, where filterString is the filter value entered via the rendered textbox, and boolean truth indicates include.
  • disabled: Boolean value, disables the component if true.

Emits

  • selectItem: Emitted when an item is selected.

Styling

Override SCSS variables specified in ./src/styles/vars.scss with your own values — in your own stylesheet!

Useful commands

Project setup:

npm install

To develop or test:

npm run serve

To build component for deployment to NPM package repository:

npm run build-lib

To build for demo (deployment):

npm run build