systomic

Required parts

An Accordion without its panel or a Dialog without its title rarely throws. It renders, silently broken or inaccessible. Declare the parts once and every call site is checked.

  • RuleIn recommended.json: breaking it breaks the design-system contract.
  • ErrorOxlint exits with a failure, so CI fails.

See the difference

Before
<AccordionItem><AccordionTrigger /></AccordionItem>
After

Yes. Your plan stays active until the end of the billing period.

Within 14 days of purchase, no questions asked.

Teams of three or more get shared billing and roles.

<AccordionItem><AccordionTrigger /><AccordionPanel /></AccordionItem>

What doesn't work

1 finding

What works

No findings

Details

Composable components (Accordion, Dialog, Tabs, Select, …) only work when every required part is rendered. A missing AccordionPanel or DialogTitle often doesn’t fail at all; it just silently renders something broken or inaccessible.

<Accordion> is missing AccordionPanel. Render every required part, as in the component’s full example.

Nothing is checked until you declare the parts, either on the component or in the config.

On the component (works across files and packages, like @systomic-allow):

In the config (for components you don’t own):

Where the parts can be:

  • Anywhere below the component, including inside map, conditions and fragments.
  • In a component rendered inside it: <Accordion><FaqItem /></Accordion> is fine when FaqItem renders the item, trigger and panel. Local and imported components are followed two levels deep.
  • Under another local name: import { AccordionItem as Item } counts as AccordionItem.

Not reported, because the content can’t be seen:

  • {children}, {props.children}, {renderItems()}, a variable holding JSX, and props that usually carry elements (items, content, slots, sections, …).
  • <Accordion {...props} /> and children={…}.
Option Default
parts {}

Inspired by complete-composition from Outtrue by Jakub Krehel.

Esc