Skip to content
Charts55Components12Visuals14ASCII45
GitHubGet startedGet started
All componentsConnect buttonAI
PreviousNext: Thinking

Hover the button, or tab to it, and watch the corners change one after another.

Connect button

AI

A button that shows what it connects to. Three provider marks sit beside the label, and on hover they ripple through every provider you support, then settle back.

Customize 1

Install & copy sourceInstall & copy sourceSee propsSee props4

Live code

As tuned above.

Every control in the inspector updates this snippet directly. Defaults are omitted to keep your markup minimal.

example.tsx

import { ConnectButton } from '@/components/lilt/ui/connect-button';

export function ConnectAi() {
  return <ConnectButton />;
}

Installation2

Source you own.

This is source, not a package: the shadcn CLI copies it into your project and it is yours to change. Take it whole, or lift the one detail you like.

$npx shadcn@latest add https://liltui.vercel.app/r/connect-button.json
components/lilt/ui/connect-button.tsx

connect-button.tsx

'use client';

import { AnimatePresence, motion, useReducedMotion } from 'motion/react';
import {
  useEffect,
  useState,
  type ButtonHTMLAttributes,
  type CSSProperties,
  type ReactNode,
} from 'react';
import { PROVIDERS, ProviderLogo } from './provider-logos';

/** A mark the triad can show. `id` keeps each one's entrance and exit apart. */
export interface TriadLogo {
  id: string;
  mark: ReactNode;
}

const EASE = [0.22, 1, 0.36, 1] as const;
const FIRST_STEP_MS = 220;

/** The AI providers, as marks the triad can cycle through. */
export const PROVIDER_MARKS: readonly TriadLogo[] = PROVIDERS.map((id) => ({
  id,
  mark: <ProviderLogo id={id} size="100%" />,
}));

export interface LogoTriadProps {
  /** Marks to cycle through; the first three are the resting set. Default the AI providers. */
  logos?: readonly TriadLogo[];
  /** Width and height of the triangle in pixels. Default 24. */
  size?: number;
  /** While true the marks ripple through the set; when it turns false they settle back. */
  cycling?: boolean;
  /** Milliseconds between swaps while cycling. Default 1000. */
  step?: number;
  /** Milliseconds between one corner swapping and the next. Default 110. */
  stagger?: number;
}

/**
 * Three marks in a triangle. Still at rest; while `cycling`, each corner blur-fades to the next
 * mark a beat after the one before, so the swap ripples round the triangle, then all three settle
 * back to the resting set.
 */
export function LogoTriad({
  logos = PROVIDER_MARKS,
  size = 24,
  cycling = false,
  step = 1000,
  stagger = 110,
}: LogoTriadProps) {
  const reduced = useReducedMotion();
  const [tick, setTick] = useState(0);
  const active = cycling && !reduced && logos.length > 3;

  useEffect(() => {
    if (!active) return;
    let interval: ReturnType<typeof setInterval> | undefined;
    const first = setTimeout(() => {
      setTick((t) => t + 1);
      interval = setInterval(() => setTick((t) => t + 1), step);
    }, FIRST_STEP_MS);
    return () => {
      clearTimeout(first);
      clearInterval(interval);
      setTick(0);
    };
  }, [active, step]);

  const cell = Math.round(size * 0.48);
  // The apex centred on top, two below.
  const corners = [
    { left: (size - cell) / 2, top: 0 },
    { left: 0, top: size - cell },
    { left: size - cell, top: size - cell },
  ];
  return (
    <span
      aria-hidden="true"
      style={{ position: 'relative', display: 'block', width: size, height: size, flexShrink: 0 }}
    >
      {corners.map((corner, index) => (
        <span key={index} style={{ position: 'absolute', ...corner }}>
          <Corner logos={logos} index={index} tick={tick} size={cell} stagger={stagger} />
        </span>
      ))}
    </span>
  );
}

function Corner({
  logos,
  index,
  tick,
  size,
  stagger,
}: {
  logos: readonly TriadLogo[];
  index: number;
  tick: number;
  size: number;
  stagger: number;
}) {
  // Each corner follows a moment after the one before it.
  const [shown, setShown] = useState(tick);
  useEffect(() => {
    const timer = setTimeout(() => setShown(tick), tick === 0 ? 0 : index * stagger);
    return () => clearTimeout(timer);
  }, [tick, index, stagger]);

  const logo = logos[(index + shown * 3) % logos.length]!;
  return (
    <span style={{ position: 'relative', display: 'grid', width: size, height: size }}>
      <AnimatePresence mode="popLayout" initial={false}>
        <motion.span
          key={logo.id}
          style={{ position: 'absolute', inset: 0, display: 'grid', placeItems: 'center' }}
          initial={{ opacity: 0, filter: 'blur(4px)', scale: 0.7 }}
          animate={{ opacity: 1, filter: 'blur(0px)', scale: 1 }}
          exit={{ opacity: 0, filter: 'blur(4px)', scale: 0.7 }}
          transition={{ duration: 0.4, ease: EASE }}
        >
          {logo.mark}
        </motion.span>
      </AnimatePresence>
    </span>
  );
}

export interface ConnectButtonProps
  extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
  /** What the button says. Default 'Connect your AI'. */
  label?: string;
  /** Marks the triad cycles through. Default the AI providers. */
  logos?: readonly TriadLogo[];
  className?: string;
  style?: CSSProperties;
}

/**
 * A button that shows what it connects to. Three provider marks sit beside the label; hover or
 * focus it and they ripple through every provider you support, then settle back when you leave.
 * An arrow slides in to say it goes somewhere.
 */
export function ConnectButton({
  label = 'Connect your AI',
  logos,
  className,
  style,
  onPointerEnter,
  onPointerLeave,
  onFocus,
  onBlur,
  ...rest
}: ConnectButtonProps) {
  const [hover, setHover] = useState(false);
  const [focus, setFocus] = useState(false);
  const reduced = useReducedMotion();
  const lit = hover || focus;
  return (
    <>
      <style href="lilt-ui-connect-button" precedence="default">
        {css}
      </style>
      <button
        type="button"
        {...rest}
        className={['lilt-cb', className].filter(Boolean).join(' ')}
        data-lit={lit || undefined}
        onPointerEnter={(event) => {
          setHover(true);
          onPointerEnter?.(event);
        }}
        onPointerLeave={(event) => {
          setHover(false);
          onPointerLeave?.(event);
        }}
        onFocus={(event) => {
          setFocus(event.currentTarget.matches(':focus-visible'));
          onFocus?.(event);
        }}
        onBlur={(event) => {
          setFocus(false);
          onBlur?.(event);
        }}
        style={style}
      >
        <span className="lilt-cb-well">
          <LogoTriad logos={logos} size={19} cycling={lit} />
        </span>
        <span className="lilt-cb-label">{label}</span>
        <motion.svg
          aria-hidden="true"
          width={14}
          height={14}
          viewBox="0 0 24 24"
          fill="none"
          stroke="currentColor"
          strokeWidth={1.85}
          strokeLinecap="round"
          strokeLinejoin="round"
          initial={false}
          animate={lit ? { x: 1, opacity: 0.9 } : { x: reduced ? 0 : -2, opacity: 0.4 }}
          transition={{ type: 'spring', stiffness: 520, damping: 34 }}
          style={{ flexShrink: 0 }}
        >
          <path d="M5 12h14M13 6l6 6-6 6" />
        </motion.svg>
      </button>
    </>
  );
}

const css = /* css */ `
.lilt-cb {
  --cb-bg: #ffffff;
  --cb-hover: #f4f4f2;
  --cb-well: #f4f4f2;
  --cb-well-hover: #ffffff;
  --cb-line: rgb(26 26 24 / 0.1);
  --cb-line-hover: rgb(26 26 24 / 0.16);
  --cb-shadow: 0 1px 2px rgb(26 26 24 / 0.05);
  --cb-ring: #7c5cff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px 0 7px;
  border: 1px solid var(--cb-line);
  border-radius: 12px;
  background: var(--cb-bg);
  box-shadow: var(--cb-shadow);
  color: inherit;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 140ms cubic-bezier(0.22, 1, 0.36, 1);
}
:where(.dark, [data-theme="dark"]) .lilt-cb {
  --cb-bg: #181817;
  --cb-hover: #20201e;
  --cb-well: #111110;
  --cb-well-hover: #171716;
  --cb-line: rgb(244 244 242 / 0.1);
  --cb-line-hover: rgb(244 244 242 / 0.17);
  --cb-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
  --cb-ring: #9a82ff;
}
[data-theme="light"] .lilt-cb {
  --cb-bg: #ffffff;
  --cb-hover: #f4f4f2;
  --cb-well: #f4f4f2;
  --cb-well-hover: #ffffff;
  --cb-line: rgb(26 26 24 / 0.1);
  --cb-line-hover: rgb(26 26 24 / 0.16);
  --cb-shadow: 0 1px 2px rgb(26 26 24 / 0.05);
  --cb-ring: #7c5cff;
}

.lilt-cb:hover {
  background: var(--cb-hover);
  border-color: var(--cb-line-hover);
}
.lilt-cb:active {
  transform: scale(0.985);
}
.lilt-cb:focus-visible {
  outline: 2px solid var(--cb-ring);
  outline-offset: 2px;
}
.lilt-cb:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.lilt-cb-well {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--cb-well);
  border: 1px solid var(--cb-line);
  flex-shrink: 0;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.lilt-cb[data-lit] .lilt-cb-well {
  background: var(--cb-well-hover);
}
.lilt-cb-label {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .lilt-cb, .lilt-cb-well { transition: none; }
}
`;
components/lilt/ui/provider-logos.tsx

provider-logos.tsx

'use client';

import type { CSSProperties } from 'react';

// Provider marks from @lobehub/icons-static-svg (MIT, https://github.com/lobehub/lobe-icons).
// Monochrome marks use currentColor, so they follow the text colour around them.

const SVGS = {
  anthropic:
    '<svg height="100%" viewBox="0 0 24 24" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z" fill="#D97757" fill-rule="nonzero"></path></svg>',
  openai:
    '<svg fill="currentColor" fill-rule="evenodd" height="100%" viewBox="0 0 24 24" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>',
  openrouter:
    '<svg fill="currentColor" fill-rule="evenodd" height="100%" viewBox="0 0 24 24" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z"></path></svg>',
  deepseek:
    '<svg height="100%" viewBox="0 0 24 24" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z" fill="#4D6BFE"></path></svg>',
  groq: '<svg fill="currentColor" fill-rule="evenodd" height="100%" viewBox="0 0 24 24" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"></path></svg>',
  ollama:
    '<svg fill="currentColor" fill-rule="evenodd" height="100%" viewBox="0 0 24 24" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"></path></svg>',
  lmstudio:
    '<svg fill="currentColor" fill-rule="evenodd" height="100%" viewBox="0 0 24 24" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="M2.84 2a1.273 1.273 0 100 2.547h14.107a1.273 1.273 0 100-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H22.04a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h14.106a1.274 1.274 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H15.38a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h14.106a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h9.698a1.273 1.273 0 100-2.547h-9.698z" fill-opacity=".3"></path><path d="M2.84 2a1.273 1.273 0 100 2.547h10.287a1.274 1.274 0 000-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H18.22a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H11.56a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h5.78a1.273 1.273 0 100-2.547h-5.78z"></path></svg>',
} as const;

export type ProviderId = keyof typeof SVGS;

/** Every provider, most widely used first. */
export const PROVIDERS: readonly ProviderId[] = [
  'anthropic',
  'openai',
  'deepseek',
  'openrouter',
  'groq',
  'ollama',
  'lmstudio',
];

/** One provider's mark, sized to a square. Decorative: say the provider's name in text nearby. */
export function ProviderLogo({
  id,
  size = 20,
  style,
}: {
  id: ProviderId;
  /** Pixels, or any CSS length such as '100%'. Default 20. */
  size?: number | string;
  style?: CSSProperties;
}) {
  return (
    <span
      aria-hidden="true"
      style={{ display: 'inline-grid', width: size, height: size, flexShrink: 0, ...style }}
      dangerouslySetInnerHTML={{ __html: SVGS[id] }}
    />
  );
}

Usage

How it behaves.

It inherits its font and takes its colours from the text colour around it, so it fits light and dark pages alike. It needs React and Motion; the shadcn CLI installs Motion for you. With reduced motion it keeps its states but drops the movement. The triad is its own export, `LogoTriad`, with a `cycling` prop, so you can put it in a sidebar row or a menu item and drive it from that row's hover. The provider marks come from Lobe Icons (MIT).

Props4

Every option.

Pass these directly to ConnectButton.

PropTypeDefaultWhat it does
labelstring'Connect your AI'What the button says.
logosTriadLogo[]PROVIDER_MARKSMarks to cycle through, each `{ id, mark }`; the first three are the resting set. Use your own for integrations, payment methods or anything else you connect to.
...buttonButtonHTMLAttributes—Everything a button takes, such as `onClick` and `disabled`.
className, stylestring, CSSProperties—Passed to the outer element.
Next componentThinking

Ready when your data is. Start with one install.

Install a package, import the stylesheet once, and drop in a card or a scene.

Read the guideRead the guideView on GitHubView on GitHub
ChartsAll chartsAll chartsFinanceFinanceCustomizeCustomizeFeaturesFeatures
ComponentsAll componentsAll componentsAIAIStatusStatusActionsActionsDataData
VisualsAll visualsAll visualsAIAIDataDataSecuritySecurityProductProduct
ASCIIAll scenesAll scenesTextTextInterfaceInterfaceBackgroundsBackgroundsMediaMediaDataData
DocsGetting startedGetting startedAPI referenceAPI referenceMotion & accessibilityMotion & accessibilityllms.txtllms.txt
React components with a little lilt.GitHubGitHubnpmnpm