-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1222 from Infineon/1221-documentation-implement-s…
…tates-foundation-page Documentation: implement States page to Foundations in Storybook
- Loading branch information
Showing
15 changed files
with
958 additions
and
834 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.74 KB
packages/components/public-storybook/images/states/state-disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.3 KB
packages/components/public-storybook/images/states/state-selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { Meta } from '@storybook/addon-docs'; | ||
|
||
import DefaultState from '../../../public-storybook/images/states/state-default.png'; | ||
import HoverState from '../../../public-storybook/images/states/state-hover.png'; | ||
import PressedState from '../../../public-storybook/images/states/state-pressed.png'; | ||
import ActiveState from '../../../public-storybook/images/states/state-active.png'; | ||
import CheckedState from '../../../public-storybook/images/states/state-checked.png'; | ||
import SelectedState from '../../../public-storybook/images/states/state-selected.png'; | ||
import FocusState from '../../../public-storybook/images/states/state-focus.png'; | ||
import DisabledState from '../../../public-storybook/images/states/state-disabled.png'; | ||
import ErrorState from '../../../public-storybook/images/states/state-error.png'; | ||
|
||
<Meta title="Foundations/States" /> | ||
|
||
# States | ||
States are micro-interactions in UI elements, that add value to your product by giving the user a feedback and improve the user experience. States refer to the different forms an element can take, based on the context that it is being used in. | ||
|
||
> Some components may not feature all states mentioned here. For detailed information on the available states and options of a specific component, refer to the documentation page dedicated to that component. | ||
## Types | ||
|
||
### Default | ||
This is the standard state of a component when it is first rendered, representing its base appearance and functionality. | ||
<img width="50%" src={DefaultState} alt="Default State" /> | ||
|
||
### Hover | ||
Activated when the user hovers their cursor over a component, indicating its interactive nature. | ||
<img width="50%" src={HoverState} alt="Hover State" /> | ||
|
||
### Pressed | ||
Occurs when a component is clicked or tapped, providing immediate visual feedback to the user. | ||
<img width="50%" src={PressedState} alt="Pressed State" /> | ||
|
||
### Active | ||
Triggered when a component is actively engaged by the user, such as when clicking on a button or input field. | ||
<img width="50%" src={ActiveState} alt="Active State" /> | ||
|
||
### Checked | ||
Applied to checkboxes, radio buttons, or switch switches to indicate that the option has been selected or activated. | ||
<img width="50%" src={CheckedState} alt="Checked State" /> | ||
|
||
### Selected | ||
Used to highlight items that have been chosen or are currently in focus within a group of selectable elements. | ||
<img width="50%" src={SelectedState} alt="Selected State" /> | ||
|
||
### Keyboard focus | ||
Keyboard focus begins when a user interacts, illuminating an item as it's navigated through using a keyboard. | ||
<img width="50%" src={FocusState} alt="Focus State" /> | ||
|
||
### Disabled | ||
Utilized to indicate that an element is present but currently inactive or unavailable for interaction. | ||
<img width="50%" src={DisabledState} alt="Disabled State" /> | ||
|
||
### Error | ||
Utilized to alert users when something has gone wrong or when their input is invalid. | ||
<img width="50%" src={ErrorState} alt="Error State" /> | ||
|