@molecule/app-oauth-logos-vue
Feature · oauth-logos · App (browser) · v1.1.1 · Apache-2.0
Canonical OAuth provider brand logos (GitHub, Google, GitLab, Twitter/X, Apple, Facebook, Microsoft, LinkedIn, Discord) as Vue SVG components — identical across every app regardless of icon bond
npm install @molecule/app-oauth-logos-vueHow it works
@molecule/app-oauth-logos-vue is a ready-made oauth-logos 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 } from 'vue'
import { OAuthProviderLogo } from '@molecule/app-oauth-logos-vue'
import { getClassMap } from '@molecule/app-ui'
export const LoginButton = defineComponent({
setup() {
const cm = getClassMap()
return () =>
h('button', { class: cm.cn(cm.myButtonChrome) }, [
h(OAuthProviderLogo, { provider: 'github', size: 20 }),
h('span', 'Continue with GitHub'),
])
},
})Reference
Canonical OAuth provider brand logos, as Vue SVG components.
The Vue counterpart of @molecule/app-oauth-logos-react: the same
exports, the same props, and the same rendered DOM for the same input.
Every logo ships as a self-contained Vue component with a normalized
24×24 viewBox and a mode prop ('brand' default — the official
multi-color mark — or 'mono' — currentColor for uniform-theme
button rows).
Unlike resolving icons through @molecule/app-icons, these logos
are bundled inline so every app renders pixel-identical marks
regardless of which icon-set bond is wired.
Exports:
OAuthProviderLogo— dispatcher for a provider id.- Individual logos:
GitHubLogo,GoogleLogo,GitLabLogo,TwitterLogo/XLogo,AppleLogo,FacebookLogo,MicrosoftLogo,LinkedInLogo,DiscordLogo. OAuthProviderId,OAuthLogoProps,OAuthProviderLogoPropstypes.
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 } from 'vue'
import { OAuthProviderLogo } from '@molecule/app-oauth-logos-vue'
import { getClassMap } from '@molecule/app-ui'
export const LoginButton = defineComponent({
setup() {
const cm = getClassMap()
return () =>
h('button', { class: cm.cn(cm.myButtonChrome) }, [
h(OAuthProviderLogo, { provider: 'github', size: 20 }),
h('span', 'Continue with GitHub'),
])
},
})
Type
feature
Installation
npm install @molecule/app-oauth-logos-vue vue
API
Interfaces
OAuthProviderLogoProps
Props for OAuthProviderLogo.
interface OAuthProviderLogoProps extends OAuthLogoProps {
provider: OAuthProviderId | string
/**
* Rendered when `provider` has no registered logo (default: nothing).
* A node-valued prop: pass it as a prop or as the same-named slot.
*/
fallback?: VNodeChild
}
OAuthLogoProps
Props shared by all OAuth provider logo components.
interface OAuthLogoProps {
/**
* Rendered size in pixels (applied to both width and height). Defaults to 20.
*
* Every logo is authored at a normalized 24×24 viewBox so scaling is
* identical across providers at any size — the logo's visual weight
* matches exactly between apps.
*/
size?: number
/** Optional className on the outer SVG element. */
className?: string
/**
* Color mode. Defaults to `'brand'` (official multi-color marks).
* Use `'mono'` to render in `currentColor` — useful for uniform
* monochrome rows that match the button text color.
*/
mode?: 'brand' | 'mono'
/**
* Accessible label. Defaults to the provider's brand name
* (e.g., `"GitHub"`, `"Google"`). Pass `''` to mark the logo
* `aria-hidden` (typical when the button itself has an aria-label).
*/
ariaLabel?: string
/** Optional title rendered as `<title>` for hover tooltips. */
title?: string
}
Types
OAuthProviderId
Canonical list of supported providers.
type OAuthProviderId =
| 'github'
| 'gitlab'
| 'google'
| 'twitter'
| 'x'
| 'apple'
| 'facebook'
| 'microsoft'
| 'linkedin'
| 'discord'
Constants
AppleLogo
Vue Apple logo. Monochrome only — mode ignored.
Counterpart of @molecule/app-oauth-logos-react's AppleLogo, with the
same props and the same DOM.
const AppleLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
DiscordLogo
Vue Discord brand mark. mode='brand' renders the official blurple
logo; mode='mono' renders in currentColor.
Counterpart of @molecule/app-oauth-logos-react's DiscordLogo, with the
same props and the same DOM.
const DiscordLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
FacebookLogo
Vue Facebook "f" mark. mode='brand' renders the blue circle with white
"f"; mode='mono' renders a monochrome "f" in currentColor.
Counterpart of @molecule/app-oauth-logos-react's FacebookLogo, with the
same props and the same DOM.
const FacebookLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
GitHubLogo
Vue GitHub Octocat brand mark.
Brand guideline: monochrome only — no brand color, so mode is ignored
(always uses currentColor). Typical placement: against a dark or
neutral background.
Counterpart of @molecule/app-oauth-logos-react's GitHubLogo, with the
same props and the same DOM.
const GitHubLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
GitLabLogo
Vue GitLab tanuki — official brand mark, normalized to a 24×24 viewBox.
mode='mono' renders a flat tanuki silhouette in currentColor.
Counterpart of @molecule/app-oauth-logos-react's GitLabLogo, with the
same props and the same DOM.
const GitLabLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
GoogleLogo
Vue Google "G" mark — per Google brand guidelines the 4-color logo is
required when space allows. In mode='mono' the logo flattens to
currentColor for use inside monochrome button rows.
Counterpart of @molecule/app-oauth-logos-react's GoogleLogo, with the
same props and the same DOM.
const GoogleLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
LinkedInLogo
Vue LinkedIn brand mark. mode='brand' renders the blue square with
white "in"; mode='mono' renders a monochrome "in" glyph.
Counterpart of @molecule/app-oauth-logos-react's LinkedInLogo, with the
same props and the same DOM.
const LinkedInLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
MicrosoftLogo
Vue Microsoft 4-square brand mark. mode='brand' renders the four
official squares; mode='mono' renders a flat 2×2 grid in
currentColor.
Counterpart of @molecule/app-oauth-logos-react's MicrosoftLogo, with
the same props and the same DOM.
const MicrosoftLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
OAuthProviderLogo
Vue dispatcher: renders the canonical logo for a given provider id.
Counterpart of @molecule/app-oauth-logos-react's OAuthProviderLogo,
with the same props and the same DOM. Use this in OAuth button rows so
the button chrome (padding, radius, width, background) stays per-app
while the logo itself is identical across every consumer. An unknown
provider id renders the fallback node — a prop or a same-named slot —
and nothing at all when neither is given.
const OAuthProviderLogo: DefineComponent<
ExtractPropTypes<{
provider: { type: StringConstructor; required: true }
size: NumberConstructor
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: StringConstructor
title: StringConstructor
fallback: null
}>,
() => any,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
provider: { type: StringConstructor; required: true }
size: NumberConstructor
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: StringConstructor
title: StringConstructor
fallback: null
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
TwitterLogo
Vue X (formerly Twitter) brand mark. Monochrome only per X brand
guidelines; mode is ignored — always uses currentColor.
Use either TwitterLogo or XLogo — they render the same SVG.
Counterpart of @molecule/app-oauth-logos-react's TwitterLogo, with the
same props and the same DOM.
const TwitterLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
XLogo
Alias of TwitterLogo — use the provider id that matches your OAuth config.
const XLogo: DefineComponent<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>,
() => VNode<RendererNode, RendererElement, { [key: string]: any }>,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
size: { type: NumberConstructor; default: number }
className: StringConstructor
mode: { type: PropType<OAuthLogoProps['mode']>; default: string }
ariaLabel: { type: StringConstructor; default: string }
title: StringConstructor
}>
> &
Readonly<{}>,
{ mode: 'brand' | 'mono' | undefined; size: number; ariaLabel: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
Injection Notes
Requirements
Peer dependencies:
vue^3.4.0
Runtime Dependencies
vue