(defisland
  ()
  (let
    ((my-ref (dict "current" nil)) (msg (signal "")))
    (div
      (~tw :tokens "rounded border border-violet-200 bg-violet-50 p-4 my-4 space-y-3")
      (input
        :ref my-ref
        :type "text"
        :placeholder "I can be focused programmatically"
        (~tw :tokens "px-3 py-1.5 rounded border border-stone-300 text-sm focus:outline-none focus:border-violet-400 w-64"))
      (div
        (~tw :tokens "flex items-center gap-3")
        (button
          (~tw :tokens "px-3 py-1 rounded bg-violet-600 text-white text-sm font-medium hover:bg-violet-700")
          :on-click (fn (e) (dom-focus (get my-ref "current")))
          "Focus Input")
        (button
          (~tw :tokens "px-3 py-1 rounded bg-stone-300 text-stone-700 text-sm hover:bg-stone-400")
          :on-click (fn
            (e)
            (let
              ((el (get my-ref "current")))
              (reset!
                msg
                (str
                  "Tag: "
                  (dom-tag-name el)
                  ", value: \""
                  (dom-get-prop el "value")
                  "\""))))
          "Read Input"))
      (when
        (not (= (deref msg) ""))
        (p (~tw :tokens "text-sm text-stone-600 font-mono") (deref msg))))))
