PhiaUi.Components.EditorHighlightPicker (phia_ui v0.1.17)

Copy Markdown View Source

Editor highlight (realce) color picker with curated academic-friendly colors.

Two variants:

  • :full — formatting toolbar: remove button + recent colors + 5x2 palette + academic hint
  • :mini — bubble menu: compact remove + 5x2 grid only

Examples

<.editor_highlight_picker id="toolbar-highlight" variant={:full} />
<.editor_highlight_picker id="bubble-highlight" variant={:mini} />

Summary

Functions

editor_highlight_picker(assigns)

Attributes

  • id (:string) (required) - Unique DOM id.
  • colors (:list) - List of %{name, hex, purpose} maps. Defaults to 10 curated academic colors. Defaults to nil.
  • show_recent (:boolean) - Show recent colors section (full variant only). Defaults to true.
  • show_labels (:boolean) - Show semantic labels for ABNT mode. Defaults to false.
  • variant (:atom) - :full for toolbar, :mini for bubble menu. Defaults to :full. Must be one of :full, or :mini.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.