@hanzo/ui

Icon Picker

import { Glyph, IconPicker, loadIcons, useIcons } from '@hanzo/ui'

No examples yet.

Types

export type GlyphProps = {
  /** The stored name: a Lucide name, or a Tabler one from an import. */
  name: string | null | undefined
  /** What it names, which decides the fallback for an unknown name. */
  kind?: IconKind
  size?: number
  color?: string
}
export type IconPickerProps = {
  /** The chosen icon's stored name. */
  value?: string | null
  onValueChange?: (name: string) => void
  /** What the chosen name is for; its fallback draws the trigger when unknown. */
  kind?: IconKind
  /** Replaces the default trigger (an outline icon button drawing the value). */
  trigger?: ReactElement
  open?: boolean
  defaultOpen?: boolean
  onOpenChange?: (open: boolean) => void
  /** The trigger's and the grid's accessible name. */
  label?: string
  searchLabel?: string
  emptyLabel?: string
  disabled?: boolean
}

Exports

GlyphIconPickerloadIconsuseIconstype GlyphPropstype IconPickerProps