You want to create a custom referenceable element.
To create a custom referenceable element like a theorem, you can create a figure of a custom
kindand write a show rule for it. In the future, there might be a more direct way to define a custom referenceable element.
Something like
- Is eliminating extra space after using #hide[] possible? - #10 by nleanba or
- How to make a custom referenceable "Lecture" element and include its date in the outline? - #5 by flokl or
- How to reference styled figures? - #2 by vmartel08
perhaps. - How do I include custom references to items in a table? - #4 by Andrew
Edit: Perhaps theoretic – Typst Universe can help you in achieving this.