Skip to main content

Icon Picker

About 307 wordsAbout 1 min

Icon Picker

Props

PropTypeDefaultDescription
idstringAuto-generatedUnique ID for the input element.
namestring-Name attribute for the input.
modelValuestring | nullnullCurrently selected icon (prefixed with bi-).
iconstring-Icon to display with the label.
labelstring | null-Field label text.
placeholderstring-Input placeholder text.
autofocusbooleanfalseWhether to focus the input on mount.
autocompletestring-Autocomplete attribute for the input.
requiredbooleanfalseWhether the input is required.
disabledbooleanfalseWhether the input is disabled.
inputClassstring | null-Additional CSS classes for the input.
attsRecord<string, unknown>{}Extra HTML attributes for the input.
infostring-Info/help text shown below the field.
containerClassstring | null-Additional classes for the dropdown container.
containerAttsRecord<string, unknown>{}Extra HTML attributes for the container.
groupClassstring | null-Additional classes for the input group.
groupAttsRecord<string, unknown>{}Extra HTML attributes for the input group.
dropdownClassstring | null-Additional classes for the dropdown.
dropdownAttsRecord<string, unknown>{}Extra HTML attributes for the dropdown.
sizestring | null-Input size (used in styling).
iconsstring[]All bi iconsOptional icon list to filter/search from.
perPagenumber25Number of icons per page.
noIconsFoundstring'No icons found'Message to show when no icons match search.
searchPlaceholderstring'Search...'Placeholder text for search input.
errorstring-Error message shown below the input.

Emits

EventPayload TypeDescription
update:modelValuestringEmitted when an icon is selected or cleared.
changestringEmitted immediately when modelValue changes.

Install

import { FgIconPicker } from 'fadgram-vue'

Basic usage

Preview

Selected icon: