# FullscreenModal FullscreenModal is a component that displays content in a full-screen overlay, typically used for immersive experiences or complex interactions. ## Import ```tsx import { FullscreenModal } from '@coinbase/cds-web/overlays/modal/FullscreenModal' ``` ## Examples Please refer to the [Modal](/components/overlay/Modal) docs for more info on setup and usage. :::tip Accessibility tip **Trigger Focus** A `ref` to the trigger that opens the modal, along with an `onDidClose` method to reset focus on the trigger when the modal closes, needs to be wired up for accessibility (see code example below).
**Labels** Modals also require an accessibility label, which we set to `title` by default. However, if you don't want to provide a `title` or there's other text that gives the user better context to the modal, then you can pass an element id to `accessibilityLabelledBy`. Alternatively, you may directly provide a contextual label to `accessibilityLabel`. ::: ### Basic example ```jsx live function DefaultModal() { const [visible, setVisible] = useState(false); const triggerRef = useRef(null); const toggleOn = useCallback(() => setVisible(true), []); const toggleOff = useCallback(() => setVisible(false), []); const handleClose = useCallback(() => { console.log('modal closing'); toggleOff(); }, [toggleOff]); const handleDidClose = useCallback(() => { if (triggerRef.current) { triggerRef.current.focus(); } }, []); const onClickConsole = () => void console.log; const SelectComponent = () => { const [value, setValue] = useState('1'); const options = [ { value: '1', label: 'Option 1' }, { value: '2', label: 'Option 2' }, { value: '3', label: 'Option 3' }, { value: '4', label: 'Option 4' }, { value: '5', label: 'Option 5' }, { value: '6', label: 'Option 6' }, ]; return (