Skip to main content

useTheme() Hook

The useTheme() hook returns all metadata on the current theme including syntax highlighting, description, HSL, token values, and more.

Usage

import { useTheme } from '@replit/extensions-react';

const Component = () => {
const theme = useTheme();

...
}

Signature

function useThemeValues(): ThemeVersion | null;

Types

ThemeVersion

A specific theme version reflecting all colors and metadata on the current theme.

Was this helpful?