Castle logo

CASTLE UI

Search

K

useThemeToken is a custom hook used to resolve design tokens from the theme.

Import

import { useThemeToken } from '@passfort/castle'

Copy

Return value

The useThemeToken hook retrieves whatever is in the theme at the given path(s).

Usage

Copy

live example

Note that you can also use the sx prop to write styles freely using themes tokens.

Contents