Castle logo

CASTLE UI

search

Search

K
hexagon

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

Import

import { useThemeToken } from '@passfort/castle'
content_copy

Copy

Return value

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

Usage

content_copy

Copy

live example

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

Contents