Blocks
Logo strip block
A row of customer names under a label in capitals, each set as a Funnel Display wordmark in the muted gray, so no third-party logo is drawn; their own marks go in the slot when you have permission.
Install
React apps get the React files; every other stack gets the web component.
npx spyglass-ds add logo-strip-block<script type="module" src="/spyglass-ds/elements/logo-strip-block.js"></script>Teams at these brands search with us
- Acme Skin
- Acme Studio
- Acme Fit
- Acme Drinks
- Acme Motors
Usage
Showing who uses the product, on a home or pricing page, with names you are allowed to show.
Never
- Third-party logos without permission, or recolored marks
- Names of customers who have not agreed to be named
- Motion or color on hover
Props
The web component takes the same as attributes or properties (<spyglass-logo-strip-block>); title is heading there.
<LogoStripBlock>
| Prop | Type | Default |
|---|---|---|
names | string[] The names, each set as a wordmark. | [] |
label | ReactNode A line in capitals above the row. | |
children | ReactNode Instead of the names: the marks themselves. | |
className | string |
Examples
The same example in React and as web components; both render identically.
import { LogoStripBlock } from '@/react/components/blocks/LogoStripBlock'
// Placeholder customers, set as wordmarks: replace them with names you may show.
const names = ['Acme Skin', 'Acme Studio', 'Acme Fit', 'Acme Drinks', 'Acme Motors']
export default function Names() {
return <LogoStripBlock label="Teams at these brands search with us" names={names} />
}<!-- Placeholder customers, set as wordmarks: replace them with names you may show. -->
<spyglass-logo-strip-block label="Teams at these brands search with us" names='["Acme Skin","Acme Studio","Acme Fit","Acme Drinks","Acme Motors"]'></spyglass-logo-strip-block>Source
import type { ReactNode } from 'react'
import { cn } from '@/react/lib/cn'
// A row of customer names under a label in capitals: each name set as a wordmark in Funnel Display, in the muted
// gray, so no third-party logo is ever drawn. Pass your customers' names (placeholders say Acme); with permission to
// show real marks, put their SVGs in `children` instead, in White. The row wraps on phones. Nothing moves on hover.
export interface LogoStripBlockProps {
/** The names, each set as a wordmark. */
names?: string[]
/** A line in capitals above the row. */
label?: ReactNode
/** Instead of the names: the marks themselves. */
children?: ReactNode
className?: string
}
export function LogoStripBlock({ names = [], label, children, className }: LogoStripBlockProps) {
return (
<section data-ds="logo-strip-block" className={cn('grid gap-8 text-fg max-sm:gap-6', className)}>
{label && <p className="type-label text-fg-muted">{label}</p>}
{children ? (
<div className="flex flex-wrap items-center justify-between gap-x-12 gap-y-6">{children}</div>
) : (
<ul className="flex flex-wrap items-center justify-between gap-x-12 gap-y-6">
{names.map((n) => <li key={n} className="type-heading-3 text-fg-muted">{n}</li>)}
</ul>
)}
</section>
)
}
export default LogoStripBlock// Joins class names, skipping falsy ones: cn('a', on && 'b', ['c', undefined]). It does not merge conflicting
// utilities (no tailwind-merge), as Vue's class binding does not: the library's classes are written not to compete,
// and a className from the caller is appended after them, as Vue appends a fallthrough class.
export type ClassValue = string | false | null | undefined | 0 | ClassValue[]
export function cn(...values: ClassValue[]): string {
const out: string[] = []
for (const v of values) {
if (!v) continue
if (Array.isArray(v)) {
const s = cn(...v)
if (s) out.push(s)
}
else out.push(v)
}
return out.join(' ')
}import { html, nothing } from 'lit'
import { DsElement, define, HostLayoutController } from '@/elements/lib/element'
import styles from 'virtual:tw'
// LogoStripBlock.tsx as <spyglass-logo-strip-block>: a `label` in capitals over a row of `names`, each set as a
// Funnel Display wordmark in the muted gray; the default slot (the marks themselves) replaces the names.
/**
* @summary A row of customer names as wordmarks.
* @slot - The marks themselves, instead of the names.
*/
export class LogoStripBlock extends DsElement {
static styles = [DsElement.styles, styles]
protected readonly layout = new HostLayoutController(this, () => this.renderRoot.querySelector<HTMLElement>('[data-ds="logo-strip-block"]'))
static properties = { names: { type: Array }, label: {} }
/** The names, each set as a wordmark. */
names: string[] = []
/** A line in capitals above the row. */
label?: string
render() {
return html`<section data-ds="logo-strip-block" class="grid gap-8 text-fg max-sm:gap-6">${this.label ? html`<p class="type-label text-fg-muted">${this.label}</p>` : nothing}${this.hasSlot() ? html`<div class="flex flex-wrap items-center justify-between gap-x-12 gap-y-6"><slot></slot></div>` : html`<ul class="flex flex-wrap items-center justify-between gap-x-12 gap-y-6">${(this.names ?? []).map((n) => html`<li class="type-heading-3 text-fg-muted">${n}</li>`)}</ul>`}</section>`
}
}
define('logo-strip-block', LogoStripBlock)Reference: Derived from the guidelines (Funnel Display, neutrals for muted text, labels in capitals with 6% tracking); no customer logos are in the brand assets, so the names are Acme placeholders.