widget

Community

Build interactive forms with Emacs widgets.

Authorhugoduncan
Version1.0.0
Installs0

System Documentation

What problem does it solve?

The Emacs Widget Library enables creating rich, interactive UI elements directly in text buffers, simplifying configuration interfaces, dialogs, and data entry without external UI frameworks.

Core Features & Use Cases

  • Widget Lifecycle: Create, setup, interact, and read values from widgets.
  • Widget Types: Text inputs (editable-field, text), buttons (push-button, link), and selection controls (checkbox, radio-button-choice, menu-choice, etc.).
  • Value Retrieval: Obtain user input via widget-value and widget-value-set.
  • Navigation & Interaction: Move between widgets with widget-forward and widget-backward.
  • Use Cases: Built-in forms, settings editors, and lightweight UI components in Emacs buffers.

Quick Start

To start:

  • Require the library: (require 'widget) and (eval-when-compile (require 'wid-edit))
  • Create a simple form, then enable widgets with widget-setup:
    (defun simple-form ()
      (interactive)
      (switch-to-buffer "*Simple Form*")
      (kill-all-local-variables)
      (erase-buffer)
      (remove-overlays)
      (widget-insert "Name:\
    

") (setq my-name (widget-create 'editable-field :size 20)) (widget-create 'push-button :notify (lambda (&rest _) (message "Submitted: %s" (widget-value my-name))) "Submit") (use-local-map widget-keymap) (widget-setup))

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: widget
Download link: https://github.com/hugoduncan/library-skills/archive/main.zip#widget

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository