@molecule/app-help-button-svelte
Feature · help-button · App (browser) · v1.1.4 · Apache-2.0
Floating help button + help-popover chrome for support widgets
npm install @molecule/app-help-button-svelteHow it works
@molecule/app-help-button-svelte 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.
<script lang="ts">
import { HelpButton } from '@molecule/app-help-button-svelte'
let open = $state(false)
</script>
<HelpButton position="bottom-right" size="md" onClick={() => (open = true)} />
<HelpButton position="inline" size="sm" href="https://docs.example.com" />Works with: @molecule/app-svelte, @molecule/app-ui, @molecule/app-ui-svelte
Reference
Svelte 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.
Svelte 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
<script lang="ts">
import { HelpButton } from '@molecule/app-help-button-svelte'
let open = $state(false)
</script>
<HelpButton position="bottom-right" size="md" onClick={() => (open = true)} />
<HelpButton position="inline" size="sm" href="https://docs.example.com" />
Type
feature
Installation
npm install @molecule/app-help-button-svelte @molecule/app-svelte @molecule/app-ui @molecule/app-ui-svelte svelte
API
Interfaces
HelpButtonProps
Props for the HelpButton component.
interface HelpButtonProps {
/** Optional icon — defaults to "?" (a snippet prop). */
icon?: Snippet
/** 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
const HelpButton: LegacyComponentType
Injection Notes
Requirements
Peer dependencies:
@molecule/app-svelte^3.15.0 || ^4.0.0@molecule/app-ui^1.0.1@molecule/app-ui-svelte^1.1.0svelte^5.0.0
Runtime Dependencies
-
@molecule/app-svelte -
@molecule/app-ui -
@molecule/app-ui-svelte -
svelte -
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-svelte's i18n service;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 is a snippet; every other prop keeps its React name.
Translations
Translation strings are provided by @molecule/app-locales-help-button.