Visibility #50
Replies: 3 comments 1 reply
-
They wrap the "VisuallyHidden" primitive. Is this not what you're looking for? |
Beta Was this translation helpful? Give feedback.
-
@LassiterJ, VisuallyHidden - hides the element leaving it in the stream, accessible to search robots! |
Beta Was this translation helpful? Give feedback.
-
This kind of thing is the responsibility of layout components, like Box or Flex. Use the <Box display={{ lg: 'none' }}>
<Button />
</Box> This is a bit more verbose, but we found that off-loading layout responsibilities to these components makes the UI code easier to maintain in the long run. Aside from margin props on each component, we don’t plan to introduce other layout props on non-layout components. |
Beta Was this translation helpful? Give feedback.
-
Hi! It seems to me it would be useful to have prop "visibility" to hide or display components. For example:
<Button visibility={lg: 'hidden'} /> css: @media (min-width: --lg) {display: none;}
or
<Button visibility={lg: 'visible'} /> css: @media (max-width: calc(--lg - 1px)) {display: none;}
You can also add hiding on touch devices.
Beta Was this translation helpful? Give feedback.
All reactions