Shadows? #29306
-
On this page: https://react.fluentui.dev/?path=/docs/theme-shadows--page are a list of various box shadow options. Looks interesting, but how are these used/referenced? I tried using the name as a class name, but nothing happened. The Element page shows the class name on the expected element, but no styling is applied. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
They are applied as part of our token system, so you can use them by importing import { makeStyles, tokens } from '@fluentui/react-components';
...
// In your styles declaration
const useStyles = makeStyles({
root: {
boxShadow: tokens.shadow8
}
}); |
Beta Was this translation helpful? Give feedback.
-
Thanks, but I get a TypeScript error:
"@fluentui/react-components": "^9.32.3", |
Beta Was this translation helpful? Give feedback.
-
Thanks, I used this:
And the resulting DIV has |
Beta Was this translation helpful? Give feedback.
They are applied as part of our token system, so you can use them by importing
tokens
from@fluentui/react-components
: