--- title: Show description: "`Show` is a component that shows or hides its children based on a condition." links: - source: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/show - storybook: https://yamada-ui.github.io/yamada-ui?path=/story/components-show--basic --- ```tsx インビジブルガール 葉隠透 ``` ## Usage ```tsx import { Show } from "@yamada-ui/react" ``` ```tsx import { Show } from "@/components/ui" ``` ```tsx import { Show } from "@workspaces/ui" ``` ```tsx ``` ### Render Conditionally To conditionally render content, set the `when` prop to a boolean value. ```tsx const [isVisible, setIsVisible] = useState(true) return ( インビジブルガール 葉隠透 ) ``` ### With Fallback To render fallback content when the condition is false, use the `fallback` prop. ```tsx const [isVisible, setIsVisible] = useState(false) return ( 衣服}> インビジブルガール 葉隠透 ) ``` ## Props | Prop | Default | Type | Description | | ---------- | ------- | ------------------------ | --------------------------------------------------- | | `children` | - | `ReactNodeOrFunction` | The children to render if `when` is `true` | | `fallback` | - | `ReactNode` | The fallback content to render if `when` is `false` | | `when` | - | `null \| Y` | If `true`, it'll render the `children` prop |