StoryRing
A picture in a ring that says whether there is a story to watch.
View code
<ul>
{people.map((person) => (
<li>
<a href={person.story}>
<StoryRing seen={person.seen} size={4}>
<img src={person.avatar} alt="" />
</StoryRing>
{person.handle}
</a>
</li>
))}
</ul>Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
import { StoryRing } from "@sdxc/ui/video";Renders the ring around its picture, its size set on the element itself so every ring shares
one set of rules and the seen state always wins. The unseen ring paints --ui-story-ring, the brand's
solid colour unless a page names a gradient; the seen ring paints the quiet border colour.
Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
| Prop | Type | Required | Description |
|---|---|---|---|
children | RemixNode | Yes | The picture inside the ring: an avatar, a drawn cover. |
seen | boolean | No | Whether every story behind it has been seen, which quiets the ring. Default: false. |
size | number | string | No | The ring's outer size in rem, or a CSS length, such as a custom property a page changes with its width. Default: 4. |
Also accepts everything in Omit<TagProps<"span">, "children">.