SCSS, BEM naming, and design tokens.
Styling decision flowchart:
Never use:
sx prop or sxStylesstyled-componentsstyle={{}} (except rare dynamic values)BEM naming:
.component-name.component-name__element.component-name--modifier.block__element__subelement)Always check if Box/FlexBox props can handle the styling:
When Box props aren't enough, use className + co-located SCSS:
Match component filename convention:
MyComponent.tsx → MyComponent.scss (PascalCase)filter-bar.tsx → filter-bar.scss (kebab-case)styles.scssUse the bem() utility from @prepared911/ui-core:
Generates:
Always use design tokens instead of hardcoded values:
Only .block and .block__element. Never .block__element__subelement.
Use media queries with design tokens:
Use Box/FlexBox props when:
Use className + SCSS when:
:hover, :focus, :nth-child)::before, ::after)Escalate to UX Guild when:
For more detailed technical guidance, see these reference files: