Formulare v1.0.0

Farbwähler

Farbauswahl-Eingabe mit Farbton-/Sättigungsfeld, Schiebereglern, Farbvorlagen und Hex-/RGB-Eingabe. Unterstützt Alphakanal und kompakten Popover-Modus. Enthält eine ziehbare Sättigungs-/Helligkeits- Leinwand, einen Farbton-Regenbogen-Schieberegler, optionalen Alpha-Schieberegler, manuelle Hex-Eingabe und klickbare Farbvorlagen. Funktioniert eigenständig oder im Kompaktmodus als kleiner Farbfeld-Auslöser.

Vorschau & Code

Optionen

Name Typ Standard Beschreibung
value String "#3b82f6" Initial hex color value
label String nil Label text displayed above the picker
hint String nil Help text displayed below the picker
swatches Array [] Array of hex color strings for preset swatches. Defaults to a built-in palette when empty.
format Symbol :hex Output format: :hex, :rgb, or :hsl
alpha Boolean false Show alpha/opacity slider
show_input Boolean true Show text input for manual hex entry
disabled Boolean false Disable the entire color picker
error String nil Error message displayed below the picker
name String nil Name attribute for the hidden form input
compact Boolean false Compact mode — renders a small swatch trigger that opens the picker as a popover

Änderungsprotokoll v1.0.0

- Initial release with saturation/lightness pad and hue slider
- Optional alpha channel slider
- Preset color swatches with active state ring
- Manual hex input with validation
- Compact popover mode
- Dark mode support throughout
- Hidden form input for Rails form integration

Vollzugang erhalten

Schalte den Quellcode für diese und alle anderen Komponenten frei. Einmalige Zahlung für lebenslangen Zugang.

Jetzt Zugang erhalten