Zubra UI
Code for
GitHub

logo-cloud

"Trusted by": a row of logos, muted so they don't shout, coming to full colour on hover. Each logo's alt text is its name; with href it's a link. items is [{ name, src, href? }].

This one has no events: it shows what it's given.

Source: logo-cloud.zb, and its registry item.

Install

Compiled (any project)
npx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/logo-cloud.jsonpnpm dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/logo-cloud.jsonyarn dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/logo-cloud.jsonbunx --bun shadcn@latest add https://zubra-js.github.io/zubra-ui/r/logo-cloud.json
One file, no dependencies (3.2 KB gzipped)
npx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/element/logo-cloud.jsonpnpm dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/element/logo-cloud.jsonyarn dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/element/logo-cloud.jsonbunx --bun shadcn@latest add https://zubra-js.github.io/zubra-ui/r/element/logo-cloud.json
.zb source (to edit it with Zubra)
npx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/src/logo-cloud.jsonpnpm dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/src/logo-cloud.jsonyarn dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/src/logo-cloud.jsonbunx --bun shadcn@latest add https://zubra-js.github.io/zubra-ui/r/src/logo-cloud.json
No build: a script tag, straight from this site
HTML
<link rel="stylesheet" href="https://zubra-js.github.io/zubra-ui/themes/default.css">
<script type="module" src="https://zubra-js.github.io/zubra-ui/cdn/logo-cloud.js"></script>

The compiled install writes src/components/zubra/logo-cloud.js and the theme, and adds @zubra/runtime to your dependencies. The one-file install writes the same path as a plain custom element that needs nothing installed (or download it and load it with a <script type="module">); it's smaller on a page with one to three components, the shared runtime with more.

Usage

index.html
<logo-cloud heading="Trusted by bakeries in 40 cities"></logo-cloud>

<script type="module">
  import './components/zubra/logo-cloud.js';

  const element = document.querySelector('logo-cloud');
  element.items = [
    { name: 'Northwind' },
    { name: 'Rise & Crumb' },
    { name: 'Globex' },
    { name: 'Initech' },
    { name: 'Umbrella' },
  ];
</script>
Example.jsx
import './components/zubra/logo-cloud.js';

const items = [
  { name: 'Northwind' },
  { name: 'Rise & Crumb' },
  { name: 'Globex' },
  { name: 'Initech' },
  { name: 'Umbrella' },
];

export function LogoCloudExample() {
  return (
    <logo-cloud heading="Trusted by bakeries in 40 cities" items={items}></logo-cloud>
  );
}
Example.vue
<script setup>
import './components/zubra/logo-cloud.js';
const items = [
  { name: 'Northwind' },
  { name: 'Rise & Crumb' },
  { name: 'Globex' },
  { name: 'Initech' },
  { name: 'Umbrella' },
];
</script>

<template>
  <logo-cloud heading="Trusted by bakeries in 40 cities" :items.prop="items"></logo-cloud>
</template>

<!-- vite.config.js: vue({ template: { compilerOptions: { isCustomElement: (tag) => tag.includes('-') } } }) -->
Example.svelte
<script>
  import './components/zubra/logo-cloud.js';
  const items = [
    { name: 'Northwind' },
    { name: 'Rise & Crumb' },
    { name: 'Globex' },
    { name: 'Initech' },
    { name: 'Umbrella' },
  ];
</script>

<logo-cloud heading="Trusted by bakeries in 40 cities" {items}></logo-cloud>
example.component.ts
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import './components/zubra/logo-cloud.js';

@Component({
  selector: 'app-logo-cloud-example',
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  template: `
    <logo-cloud heading="Trusted by bakeries in 40 cities" [items]="items"></logo-cloud>
  `,
})
export class LogoCloudExample {
  items = [
    { name: 'Northwind' },
    { name: 'Rise & Crumb' },
    { name: 'Globex' },
    { name: 'Initech' },
    { name: 'Umbrella' },
  ];
}

API

Properties (each is also an HTML attribute of the same name, unless marked)
PropertyTypeDefault
items
property only
{ name }[][]
headingstring""
heightstring"2rem"

Size

1.1 KB gzipped for the component, plus the runtime, which every Zubra component on a page shares (up to 22.1 KB, all of it). On its own, with the parts of the runtime it uses, it's 17.3 KB.

Theme

Every component reads shadcn/ui's CSS variables, so any shadcn theme works. Pick a look or a colour, or paste a theme's CSS.

Look: colours, fonts, corners and motion

Accent colour