Comments (4)
The Switch Component
The Switch component has 3 states - unselected, hovered, and selected.
- By default, there is always one item that has the selected state.
- Hovering on an item will add a small blue border to it.
- Clicking it will deselect the currently active item and add the Selected state to the item clicked.
Mobile
As we have limited screen real estate on mobile, changing the Switch to a Select seems most appropriate here. Vertically stacking the selection could be one option, however this will take up a significant amount of room.
Changes from original design
- Changed the overall style of the Switch to distance itself from a button group/button. As these have different effects for the user, we want to keep them visually separate.
from design-system.
The difference between Hover and Selected is quite subtle in terms of border width. I wonder if the hover could be lower contrast and the selected could have a slightly larger border and higher contrast?
from design-system.
This is now in active development.
from design-system.
WIP @ #266
from design-system.
Related Issues (20)
- Phase banner doesn't wrap well on small viewports
- Allow arbitrary content in Alert
- Enable an Inline Nav variant for Masthead
- Upgrade Storybook
- Supplementary colours supc and supd are the same HOT 1
- Add design tokens to Storybook HOT 1
- Make Masthead responsive
- Add focus trap to Modal
- Expose token values for use in storybook
- DataGrid: Click area of checkboxes is incorrect HOT 1
- Chromatic not reporting status in PRs
- Resolve node 16 GHA warnings
- Adjust component box-shadows inline with new Elevation guidelines HOT 1
- Remove shadow token '4'
- Update token description with more abstract definitions
- When clicking the icon the input should have focus on `TextInputE`
- Update DataGrid styling to latest
- Export selector functions directly in @royalnavy/design-tokens HOT 1
- Implement DataGrid Expandable Sub Rows and Column Groupings
- Masthead search box appears below Sidebar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from design-system.