Add landing page for kjol, documentation

This commit is contained in:
2026-07-13 16:51:21 -04:00
parent 5230bd6702
commit fec8ef4a3e
54 changed files with 3529 additions and 547 deletions

View File

@@ -403,6 +403,13 @@ type FloatingTriggerProps struct {
// OnClick runs in addition to the toggle (which is suppressed when the trigger
// opens on hover).
OnClick func()
// NoToggle anchors the panel to this element without making it a switch.
//
// A text field is not a switch: the panel opens because you typed, and closes
// because you chose something. Toggling on click means clicking back into the field
// to fix a typo dismisses the results you were reading.
NoToggle bool
}
// Trigger renders the element the panel is anchored to.
@@ -436,6 +443,10 @@ func (f *Floating) Trigger(p FloatingTriggerProps, children ...*vdom.VNode) *vdo
if p.OnClick != nil {
mods = append(mods, vdom.On(vdom.EVENT_CLICK, p.OnClick))
}
} else if p.NoToggle {
if p.OnClick != nil {
mods = append(mods, vdom.On(vdom.EVENT_CLICK, p.OnClick))
}
} else {
mods = append(mods, vdom.On(vdom.EVENT_CLICK, func() {
if p.OnClick != nil {