Skip to Content

Hairline Orbits

Two hairline orbits behind a piece of media, and a small ring-and-tether orbit mark for a poster. Decorative, in the theme's text color.

Installation

pnpm dlx shadcn@latest add @01orbital/hairline-orbits

Usage

import {
  HairlineOrbitMark,
  HairlineOrbits,
} from "@/components/graphics/hairline-orbits"

export default function HairlineOrbitsDemo() {
  return (
    <div className="relative grid aspect-[4/3] w-full max-w-md place-items-center text-foreground">
      <HairlineOrbits />
      <HairlineOrbitMark />
    </div>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/hairline-orbits-demo

Anatomy

Hairline Orbits is built from 2 parts. In the example they nest like this:

HairlineOrbits
HairlineOrbitMark
  • HairlineOrbits: Two hairline orbits behind a piece of media: a solid ring up and to the left, a larger dashed ring down and to the right. It fills its nearest positioned parent and ignores the pointer, so put it first inside a relative box (Split Card's media already is one) and the media after it. Decorative: hidden from assistive tech. The rings take the text color at 25%, so they follow the theme.
  • HairlineOrbitMark: A small orbit diagram in a line of content: a ring, a dashed tether and a larger ring, in the current text color. Made for a Poster, between its description and footnote. Decorative: hidden from assistive tech.

API reference

HairlineOrbits

Two hairline orbits behind a piece of media: a solid ring up and to the left, a larger dashed ring down and to the right. It fills its nearest positioned parent and ignores the pointer, so put it first inside a relative box (Split Card's media already is one) and the media after it. Decorative: hidden from assistive tech. The rings take the text color at 25%, so they follow the theme.

It accepts the HTML attributes of the element it renders.

HairlineOrbitMark

A small orbit diagram in a line of content: a ring, a dashed tether and a larger ring, in the current text color. Made for a Poster, between its description and footnote. Decorative: hidden from assistive tech.

It accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs it for you.

Used in blocks

One block is built with Hairline Orbits.

Last updated on