Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Methods

Call show, hide, focus, and other imperative APIs via refs, @query, or DOM ids.

Overview

Many components expose imperative methods (show, hide, focus, open, and others). Call them on the vu-* custom element — how you obtain that reference differs per environment.

Across frameworks

ReactVueHTML / Lit
Get elementuseRef on the wrapperTemplate ref (element or $el)Lit @query / HTML getElementById
Overlaysref.current?.show() / controlled openPrefer v-model:open; ref for other methodsdialog.show() / hide()
Type hintHTMLElementTagNameMap["vu-*"] for method signatures

Examples

import { useRef } from "react";
import { VuButton } from "@velkin/react/button";
import { VuDialog } from "@velkin/react/dialog";

export function Confirm() {
  const dialogRef = useRef<HTMLElementTagNameMap["vu-dialog"] | null>(null);

  return (
    <>
      <VuButton onClick={() => dialogRef.current?.show()}>Open</VuButton>
      <VuDialog ref={dialogRef as never} closable onVuClose={() => dialogRef.current?.hide()}>
        <span slot="header">Hello</span>
        <div slot="body">Opened with show().</div>
      </VuDialog>
    </>
  );
}

Edge cases

  • Use methods for imperative overlays, focus after async work, or APIs that are awkward as props alone.
  • Prefer documented props and events when they exist — for example controlled open plus close handlers when state lives in your app.
  • Method names are listed on each component's Methods table. Do not invent helpers.

Next steps

  • Events — controlled open and close handlers
  • Slots — dialog regions and composition
  • Live Method demos on each component page
PreviousSlotsNextAppearance