GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing docs.nativebase.io — Hidden | NativeBase | Universal Components for React and React Native

Hidden | NativeBase | Universal Components for React and React Native

NativeBase
3.4.x
🎉 Prompt to React Native UI
→
Search
⌘
K
Hire us
NativeBase
Introduction
Getting Started
Installation
Setup NativeBase Provider
Migration
Upgrading to v3
Upgrading to 3.2.0 from 3.x
Upgrading to 3.4.0 from 3.3.x
Components Migration
ActionSheet
Badge
Button
Card
Checkbox
DatePicker
DeckSwiper
Drawer
FABs
FooterTab
Form
Header
Icon
Layout
Picker
Radio Button
Searchbar
Segment
Spinner
SwipeList
Tabs
Thumbnail
Toast
Typography
Resources
Contribution
Creating a Universal App with NativeBase and Solito
Core Concepts
Utility First
Utility Props Specificity
Design Tokens
Pseudo Props: Overview
Pseudo Props: Dos & Don'ts
Internal Pseudo Props
Responsive
Features
Utility Props
Color mode (Dark Mode)
NativeBase Factory
SafeAreaView Props
Strict Mode
Accessibility
Theme
Default Theme
Customizing Theme
Customizing Fonts
Customizing Components
Making components dark mode compatible
Breakpoints
Using Theme
TypeScript
Layout
AspectRatio
Box
Center
Container
Flex
HStack / Row
Stack
VStack / Column
ZStack
Forms
Button
Pressable
Checkbox
FormControl
IconButton
Input
Link
Radio
Select
Slider
Switch
TextArea
Data Display
Badge
Divider
Feedback
Alert
Progress
Skeleton
Spinner
Toast
Typography
Text
Heading
Overlay
AlertDialog
Menu
Modal
Popover
Tooltip
Disclosure
ActionSheet
Media and Icons
Avatar
Icon
Image
Transition
PresenceTransition
Slide
Stagger
Others
Fab
Hidden
ReactNative Components
ScrollView
View
KeyboardAvoidingView
StatusBar
FlatList
SectionList
Hooks
useDisclose
useBreakpointValue
useClipboard
useMediaQuery
useTheme
useToken
useColorMode
useColorModeValue
useContrastText
useAccessibleColors
Examples
Todo-List
Kitchen Sink
Recipes
Designs
AppBar
Card
Drawer Navigation
Tab View
Swipe List
Forms
Form with Validation
Login/Signup Forms
SearchBar
Layout
App Drawer
Footer
More
Changelog
Testing
FAQ's
More Props
If you are starting a new project, please try gluestack-ui for better performance and new design.
Hidden
Hidden is used to toggle the visibility value of child components responsively, based on the colorMode or based on the platform. It does not mount the child components in the restricted values of props.
Import
Copy
import { Hidden } from 'native-base';
Example
Basic
Copy
<Hidden>
<Box bg="red.400" p="2">
<Text>This text will be always hidden.</Text>
</Box>
</Hidden>
Hidden according to breakpoints
Copy
<>
<Hidden from="sm" till="lg">
<Box bg="red.400" p="2">
<Text>This text will be hidden from sm to lg screens.</Text>
</Box>
</Hidden>
<Hidden only={['sm', 'lg']}>
<Box bg="red.400" p="2">
<Text>This text will be hidden on sm and lg screens only.</Text>
</Box>
</Hidden>
</>
Hidden according to colorMode
Note: Here, the Image will mount and unmount on the basis of colormode.
Playground
const Example = () => {
const {
toggleColorMode
} = useColorMode();
return <Center>
<Button colorScheme="coolGray" _light={{
_text: {
color: "white"
}
}} onPress={() => {
toggleColorMode();
}}>
Change mode
</Button>
<Hidden colorMode="dark">
<Center mt="5">
<Image w="150" h="150" source={{
uri: "https://images.unsplash.com/photo-1561566482-5fa7e82d88b7?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1471&q=80"
}} alt="image" />
</Center>
</Hidden>
<Hidden colorMode="light">
<Center mt="5">
<Image w="150" h="150" source={{
uri: "https://images.unsplash.com/photo-1590083948603-b270aff24cc1?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=764&q=80"
}} alt="image" />
</Center>
</Hidden>
</Center>;
};
Hidden according to platform
Copy
<Hidden platform={['android', 'web']}>
<Box bg="red.400" p="2">
<Text>This text will be hidden on android and web.</Text>
</Box>
</Hidden>
Props
from
The from prop takes breakpoint from which the wrapped component is hidden.
Type: LiteralUnion<"base" | "sm" | "md" | "lg" | "xl", string>
till
The till prop takes breakpoint till which the wrapped component is hidden.
Type: LiteralUnion<"base" | "sm" | "md" | "lg" | "xl", string>
only
The only prop takes array of breakpoints on which the wrapped component is hidden. It hides the component starting from that breakpoint to the next breakpoint.
Type: LiteralUnion<"base" | "sm" | "md" | "lg" | "xl", string> | LiteralUnion<"base" | "sm" | "md" | "lg" | "xl", string>[]
colorMode
The colormode takes the mode on which the wrapped component must be hidden.
Type: "light" | "dark"
platform
The platform takes the platform as string or array for the multiple on which the wrapped component must be hidden.
Type: LiteralUnion<"ios" | "android" | "web", string> | LiteralUnion<"ios" | "android" | "web", string>[]
Previous
Fab
Next
ScrollView
Quick Nav
Import
Example
Basic
Hidden according to breakpoints
Hidden according to colorMode
Hidden according to platform
Props
MadeWithNativeBase
gluestack-ui
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.