(defcomp
  ()
  (~docs/page
    :title "Signal-Bound Triggers"
    (p
      "Inside an island, "
      (em "all")
      " attributes are reactive — including "
      (code "sx-get")
      ". When an attribute value contains "
      (code "deref")
      ", the DOM adapter wraps it in an effect that re-sets the attribute when signals change.")
    (p
      "Select a search category. The "
      (code "sx-get")
      " URL on the search button changes reactively. Click \"Search\" to fetch from the current endpoint. The URL was computed from the "
      (code "mode")
      " signal at render time and updates whenever the mode changes.")
    (~reactive-islands/marshes/demo-marsh-signal-url)
    (~docs/code
      :src (highlight
        ";; sx-get URL computed from a signal\n(defisland ~reactive-islands/marshes/demo-marsh-signal-url ()\n  (let ((mode (signal \"products\"))\n        (query (signal \"\")))\n    (div\n      ;; Mode selector — changes what we're searching\n      (div :class \"flex gap-2\"\n        (button :on-click (fn (e) (reset! mode \"products\"))\n          :class (computed (fn () ...active-class...))\n          \"Products\")\n        (button :on-click (fn (e) (reset! mode \"events\")) \"Events\")\n        (button :on-click (fn (e) (reset! mode \"posts\")) \"Posts\"))\n\n      ;; Search button — URL is a computed expression\n      (button :sx-get (computed (fn ()\n                (str \"/sx/(geography.(reactive.(api.search-\"\n                     (deref mode) \")))\" \"?q=\" (deref query))))\n              :sx-target \"#signal-results\"\n              :sx-swap \"innerHTML\"\n        \"Search\")\n\n      (div :id \"signal-results\"))))"
        "lisp"))
    (p
      "No custom plumbing. The same "
      (code "reactive-attr")
      " mechanism that makes "
      (code ":class")
      " reactive also makes "
      (code ":sx-get")
      " reactive. "
      (code "get-verb-info")
      " reads "
      (code "dom-get-attr")
      " at trigger time — it sees the current URL because the effect already updated the DOM attribute.")))
