Skip to main content

Signature

Parameters

[ElementType, ElementType]
required
A tuple of two components that will share this config. Used only for type inference — not stored or used at runtime.
object
required
Configuration object. Identical structure to styled() config — see styled() Config Properties for details.The config is validated against both components. If a variant value sets a prop that doesn’t exist on one of the components, TypeScript will error.

Returns

The exact same config object (identity function). Zero runtime overhead — exists purely for type inference.

Example

Type Safety

The config is validated against both components simultaneously. If a variant sets a prop that only exists on one component, TypeScript will catch it:

See Also