Primitive · v1
TypePill
A chip that says what kind of thing something is. It takes both its glyph and its colour from
src/design/skyTypes.ts, so the caller never picks either — which is the point.
Every pill on the site used to be the same grey rectangle, and the only way to tell a galaxy
from a star was to read the word.
— Every type
Grouped by family. A family shares a tone, because the tone is what the sky already paints; the glyph is what separates members inside it. See Foundations · Sky types for the law the table obeys.
Stars
Deep sky
Figures
Solar system
Events
— Variants
pill
The default. A bordered chip naming the kind, for a header or a detail row that has room for the word.
dot
The same identity at list density: colour and glyph, no label, for a row that already names the thing beside it. The label survives for screen readers and as a title carrying the gloss.
label override
For a catalogue class sharper than the table's own word. It overrides the text only — never the tone and never the glyph, so a renamed pill still reads as its family.
— Sizes
sm is the list rung and the default; md rides UI text and is what the
info panel header uses.
— In a list
The case the primitive exists for. Five kinds of thing, one column: the dots carry the answer before any of the names have been read.
- Star Mizarmag 2.2
- Galaxy M 51Whirlpool
- Asterism The Big Dipper7 stars
- Planet Jupitermag −2.4
- Meteor shower Perseidspeaks 12 Aug
— skyTypeFor()
Call sites never hand-pick an id from a kind string. skyTypeFor(kind, subtype)
translates the engine's selection kinds and the deep-sky catalogue's free-text class exactly
once, so the catalogue's vocabulary cannot be re-interpreted differently on two pages.
| kind | subtype | → type | pill |
|---|---|---|---|
star | — | star | Star |
star | double | double-star | Double star |
star | variable | variable-star | Variable star |
dso | galaxy | galaxy | Galaxy |
dso | planetary nebula | planetary-nebula | Planetary nebula |
dso | globular cluster | globular-cluster | Globular cluster |
dso | open cluster | cluster | Open cluster |
dso | supernova remnant | nebula | Nebula |
body | sun | sun | The Sun |
body | moon | moon | The Moon |
body | mars | planet | Planet |
region | — | constellation | Constellation |
asterism | — | asterism | Asterism |
When to use
Wherever an object's kind is shown: search results, the Tonight list, the archive, the info panel header, related-object links. If you are about to write a <span> with a border and the word "Galaxy" in it, this is that span.
When not to
It is not a status badge and not a tag. A pill whose tone is chosen by the caller is a different component; this one's whole contract is that the type decides. For a filter chip the reader can toggle, use a Toggle — a pill is never interactive.