Annotations
Components describe their own contract in a comment above the declaration. Call sites in any file, or any package, are checked against it.
@systomic-allow and @systomic-disallow
What a call site may pass. @systomic-allow <prop> <values...> lists what a prop may take, @systomic-disallow <prop> <values...> what it may not. Props without a line aren’t checked. Used by component-overrides.
123456/** * @systomic-allow className placement * @systomic-allow style none * @systomic-allow tone neutral danger */export function Button(props: ButtonProps) {}12<Button className="mt-4" tone="danger" /> // fine<Button className="h-[52px] bg-red-500" tone="primary" /> // reported, twiceOften it’s easier to say what’s off limits. Everything except sizing:
12/** @systomic-disallow className sizing */export function Card(props: CardProps) {}12<Card className="mt-4 bg-muted p-6" /> // fine<Card className="w-full h-64" /> // reported, twiceBoth on one prop take the allowed values minus the disallowed ones. Layout, but no heights:
1234/** * @systomic-allow className layout * @systomic-disallow className h-* min-h-* max-h-* */@systomic-disallow <prop> * forbids the prop entirely, like @systomic-allow <prop> none. Repeated lines for the same prop add up.
Values
| Value | Meaning |
|---|---|
* |
Everything. |
none |
Nothing (only with allow: the prop can’t be passed). |
placement, sizing, layout |
A group, see below. Only for className, style and xstyle. |
w-*, margin*, h-8 |
A glob or exact class / CSS property. |
neutral danger |
Literal values, for any other prop. |
Groups
| Group | Tailwind classes (className) |
CSS properties (style, xstyle, CSS modules) |
|---|---|---|
placement |
Margin: m-*, mx-*, my-*, mt-*, mr-*, mb-*, ml-*, ms-*, me-*Position: static, fixed, absolute, relative, stickyInset: inset-*, inset-x-*, inset-y-*, inset-s-*, inset-e-*, top-*, right-*, bottom-*, left-*, start-*, end-*Stacking: z-*Self-alignment: self-*, justify-self-*, place-self-*Grid/flex child: order-*, col-span-*, col-start-*, col-end-*, row-span-*, row-start-*, row-end-*, col-auto, row-auto, col-span-full, row-span-full, grow, shrink, basis-*, flex-1, flex-auto, flex-initial, flex-noneDisplay toggles: hidden, block, inline-block, inline, contents |
margin*, position, inset*, top*, right*, bottom*, left*, zIndex, order, display, alignSelf, justifySelf, placeSelf, gridArea*, gridColumn*, gridRow*, flex, flexGrow, flexShrink, flexBasis |
sizing |
w-*, h-*, size-*, min-w-*, min-h-*, max-w-*, max-h-*, aspect-* |
width, height, minWidth, minHeight, maxWidth, maxHeight, inlineSize, blockSize, minInlineSize, minBlockSize, maxInlineSize, maxBlockSize, aspectRatio |
layout |
placement + sizing |
placement + sizing |
Not in any group, so only reachable through * or a glob: padding, gap, colors, typography, borders, radius, shadows, opacity, transforms, transitions. These are what a component decides itself.
Classes are matched without variants, ! and a leading - (md:-mt-2 counts as mt-2). CSS properties are matched in camelCase (margin-top counts as marginTop). CSS-module classes are checked by the declarations behind them (.big { height: 4rem } is sizing).
@systomic-parts
The parts a composable component needs. | lists alternatives. Used by required-parts.
1234567/** * @systomic-parts AccordionItem AccordionTrigger AccordionPanel */export function Accordion(props: AccordionProps) {}
/** @systomic-parts DialogContent|DialogPopup DialogTitle */export function Dialog(props: DialogProps) {}@systomic-overlay
Marks an app component as an overlay that must stay mounted and open through open. Components ending in Dialog, Modal, Sheet, Drawer or Popover are overlays without it. Used by no-conditional-overlay.
12/** @systomic-overlay */export function Confirm(props: ConfirmProps) {}Across files and packages
Annotations are read where the component is declared: relative and aliased imports, barrel files, default exports and packages in node_modules.
- Workspace packages: add a
sourcecondition toexportsthat points at the sources, and annotations are read straight from the.tsxfiles. - Published packages: annotations are read from the
.d.tsfiles.tsckeeps JSDoc comments unlessremoveCommentsis on.
After changing an annotation, editors update call sites in other files when those are linted again. CI is not affected.