shine-border
A frame with a beam of light travelling around its border, in the theme's chart colours, for the plan or feature you want noticed. Decorative, and still under reduced motion.
Team plan
Unlimited projects and five seats, $12 a month.
This one has no events: it shows what it's given.
Source: shine-border.zb, and its registry item.
Install
npx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/shine-border.jsonpnpm dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/shine-border.jsonyarn dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/shine-border.jsonbunx --bun shadcn@latest add https://zubra-js.github.io/zubra-ui/r/shine-border.json
npx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/element/shine-border.jsonpnpm dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/element/shine-border.jsonyarn dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/element/shine-border.jsonbunx --bun shadcn@latest add https://zubra-js.github.io/zubra-ui/r/element/shine-border.json
npx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/src/shine-border.jsonpnpm dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/src/shine-border.jsonyarn dlx shadcn@latest add https://zubra-js.github.io/zubra-ui/r/src/shine-border.jsonbunx --bun shadcn@latest add https://zubra-js.github.io/zubra-ui/r/src/shine-border.json
<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/shine-border.js"></script>The compiled install writes src/components/zubra/shine-border.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
<shine-border>
<div class="demo-hero">
<h2>Team plan</h2>
<p>Unlimited projects and five seats, $12 a month.</p>
</div>
</shine-border>
<script type="module">
import './components/zubra/shine-border.js';
const element = document.querySelector('shine-border');
element.duration = 6;
</script>import './components/zubra/shine-border.js';
const duration = 6;
export function ShineBorderExample() {
return (
<shine-border duration={duration}>
<div className="demo-hero">
<h2>Team plan</h2>
<p>Unlimited projects and five seats, $12 a month.</p>
</div>
</shine-border>
);
}<script setup>
import './components/zubra/shine-border.js';
const duration = 6;
</script>
<template>
<shine-border :duration.prop="duration">
<div class="demo-hero">
<h2>Team plan</h2>
<p>Unlimited projects and five seats, $12 a month.</p>
</div>
</shine-border>
</template>
<!-- vite.config.js: vue({ template: { compilerOptions: { isCustomElement: (tag) => tag.includes('-') } } }) --><script>
import './components/zubra/shine-border.js';
const duration = 6;
</script>
<shine-border {duration}>
<div class="demo-hero">
<h2>Team plan</h2>
<p>Unlimited projects and five seats, $12 a month.</p>
</div>
</shine-border>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import './components/zubra/shine-border.js';
@Component({
selector: 'app-shine-border-example',
schemas: [CUSTOM_ELEMENTS_SCHEMA],
template: `
<shine-border [duration]="duration">
<div class="demo-hero">
<h2>Team plan</h2>
<p>Unlimited projects and five seats, $12 a month.</p>
</div>
</shine-border>
`,
})
export class ShineBorderExample {
duration = 6;
}API
| Property | Type | Default |
|---|---|---|
duration | number | 6 |
width | string | "1.5px" |
| Slot | For |
|---|---|
(default) | What the frame holds. |
Size
0.8 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.0 KB.