@molecule/app-help-button-vue
Feature · help-button · App (browser) · v1.1.3 · Apache-2.0
Floating help button + help-popover chrome for support widgets
npm install @molecule/app-help-button-vueHow it works
@molecule/app-help-button-vue is a ready-made help-button feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
import { defineComponent, h, ref } from 'vue'
import { HelpButton } from '@molecule/app-help-button-vue'
const Support = defineComponent({
setup() {
const open = ref(false)
return () => [
h(HelpButton, { position: 'bottom-right', size: 'md', onClick: () => (open.value = true) }),
h(HelpButton, { position: 'inline', size: 'sm', href: 'https://docs.example.com' }),
]
},
})Works with: @molecule/app-ui, @molecule/app-ui-vue, @molecule/app-vue
Reference
Vue floating / inline help button — a circular button for launching help,
support chat, or docs. Fixed bottom-corner positioning by default;
position="inline" renders a normal in-flow button.
Vue counterpart of @molecule/app-help-button-react: the same props, and
the same DOM for the same input.
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
import { defineComponent, h, ref } from 'vue'
import { HelpButton } from '@molecule/app-help-button-vue'
const Support = defineComponent({
setup() {
const open = ref(false)
return () => [
h(HelpButton, { position: 'bottom-right', size: 'md', onClick: () => (open.value = true) }),
h(HelpButton, { position: 'inline', size: 'sm', href: 'https://docs.example.com' }),
]
},
})
Type
feature
Installation
npm install @molecule/app-help-button-vue @molecule/app-ui @molecule/app-ui-vue @molecule/app-vue vue
API
Interfaces
HelpButtonProps
Props for the HelpButton component.
interface HelpButtonProps {
/**
* Optional icon — defaults to "?". Passed as a prop or as the same-named
* slot — both work.
*/
icon?: VNodeChild
/** Accessible label — defaults to "Help". */
label?: string
/** Click handler — open a help panel, support chat, docs, etc. */
onClick?: (event: MouseEvent) => void
/** When provided, clicking navigates to this URL. Mutually exclusive with onClick. */
href?: string
/** Visual size. Defaults to `'md'`. */
size?: 'sm' | 'md' | 'lg'
/** Position when used as a floating button. Defaults to `'bottom-right'`. */
position?: 'bottom-right' | 'bottom-left' | 'inline'
/** Show unread/notification dot in the corner. */
hasNotification?: boolean
/** Extra classes. */
className?: string
}
Constants
HelpButton
Floating (or inline) help button — opens a support panel, chat widget, or docs. Default icon is "?" but apps can swap in their own.
Use position="inline" inside other UI to drop the fixed
positioning and render as a normal in-flow button.
const HelpButton: DefineComponent<
ExtractPropTypes<{
icon: null
label: { type: StringConstructor; default: undefined }
onClick: { type: PropType<(event: MouseEvent) => void>; default: undefined }
href: { type: StringConstructor; default: undefined }
size: { type: PropType<'sm' | 'md' | 'lg'>; default: string }
position: { type: PropType<'bottom-right' | 'bottom-left' | 'inline'>; default: string }
hasNotification: { type: BooleanConstructor; default: boolean }
className: { type: StringConstructor; default: undefined }
}>,
() => VNode,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
icon: null
label: { type: StringConstructor; default: undefined }
onClick: { type: PropType<(event: MouseEvent) => void>; default: undefined }
href: { type: StringConstructor; default: undefined }
size: { type: PropType<'sm' | 'md' | 'lg'>; default: string }
position: { type: PropType<'bottom-right' | 'bottom-left' | 'inline'>; default: string }
hasNotification: { type: BooleanConstructor; default: boolean }
className: { type: StringConstructor; default: undefined }
}>
> &
Readonly<{}>,
{
label: string
onClick: (event: MouseEvent) => void
href: string
size: 'sm' | 'md' | 'lg'
position: 'bottom-right' | 'bottom-left' | 'inline'
hasNotification: boolean
className: string
},
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
props— Component props (seeHelpButtonProps).
Returns: The help button component.
Injection Notes
Requirements
Peer dependencies:
@molecule/app-ui^1.0.1@molecule/app-ui-vue^1.1.0@molecule/app-vue^3.14.0 || ^4.0.0vue^3.4.0
Runtime Dependencies
-
@molecule/app-ui -
@molecule/app-ui-vue -
@molecule/app-vue -
vue -
The button ships with NO surface styling of its own (no background, border, or shadow) — pass
classNamewith your surface classes or it renders as a bare "?" floating over the page. -
useTranslation()supplies the default aria-label (helpButton.label) and THROWS outside@molecule/app-vue's i18n plugin;getClassMap()needs a bonded ClassMap. Passlabelto skip i18n for the aria-label. -
hrefandonClickare mutually exclusive —hrefwins and renders an<a>; there is notarget="_blank"handling, add your own anchor if you need one. -
The
iconprop takes a VNode or a same-named slot; every other prop keeps its React name.
Translations
Translation strings are provided by @molecule/app-locales-help-button.