ChakraUI/V3/Remove Theme Tools

1.0.0Last update Oct 26, 2024
by@yugal41735

Theme tools has been removed, so this codemod transforms it, to use CSS color mix.

Example

Before

defineStyle({
bg: transparentize('blue.200', 0.16)(theme),
// -> rgba(0, 0, 255, 0.16)
});

After

defineStyle({
bg: 'blue.200/16',
// -> color-mix(in srgb, var(--chakra-colors-200), transparent 16%)
});

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now