@hz-libs/bpe-ui-selectbox
v0.1.3
Published
Select box primitive.
Readme
@hz-libs/bpe-ui-selectbox
Select box primitive for Vue 3.
Install
pnpm add @hz-libs/bpe-ui-selectboxThe app must already depend on Vue ^3.5.0. This package depends on @hz-libs/bpe-ui-popover. Component CSS is included in the JavaScript import.
Use
v-model holds the selected option. The menu includes a search field and a clear control. multiple stores an array of options. disable stops the control from opening. error outlines the control when the current value needs attention.
<script setup>
import { ref } from 'vue'
import { SelectBox } from '@hz-libs/bpe-ui-selectbox'
const options = [
{ value: 'dialog', label: 'Dialog' },
{ value: 'select', label: 'Select box' }
]
const selected = ref({ value: null, label: null })
</script>
<template>
<SelectBox v-model="selected" :options="options" placeholder="Choose a primitive" />
</template>Exports
SelectBox, SelectBoxItem, SelectBoxRightAction, determinePaginationTypeDefault, getListVisibilityInfo, hasNextDefault, parseSelectedOptionValue, searchFunctionDefault, useOptionApi.
