diff --git a/docs/essentials/states.md b/docs/essentials/states.md index 3a7a569..a47a2c1 100644 --- a/docs/essentials/states.md +++ b/docs/essentials/states.md @@ -22,7 +22,7 @@ const Button = { }; ``` -When `Button` is focused via the [useFocusManager](/primitives/useFocusManager.md), the `$focus` state will be added to the button, causing the focus styles to be applied. And when focus is removed, the original styles on the element will be set. +When `Button` is focused via the [useFocusManager](/primitives/useFocusManager.md), the `$focus` state will be added to the button, causing the focus styles to be applied. And when focus is removed, each key the state set goes back to its original value: `theme`'s, else the style object's. > Be sure to set defaults on the original styles if applying a new style via state. Example: clipping: false, focus: { clipping: true } @@ -59,6 +59,12 @@ createEffect(() => { Note: states always use the values in the style object. If you have a button with a base color, and a disabled and focus state which both change the color, the value applied to the button will be determined from the style object. You won't be able to set the color of the button on the JSX `