Navigation
Inputs & Forms
Selection
Containers & Overlays
Overview
The Blanket dims the screen behind overlays. It is part of modals and sheets; this example opens both to show how blankets stack.
"use client";import {Button,FormField,FormSpacing,IconErrorWarning,IconExpandDown,Input,Modal,ModalActions,ModalTitle,Sheet,SheetHeader,SplitButton,Tile,TileContent,TileFooter,TileHeader,} from "@brynlabs/fusion-ui";import React, {useState} from "react";export const BlanketExample = () => {const [isOpen, setIsOpen] = useState(false);const [smallModalOpen, setSmallModalOpen] = useState(false);return (<div style={{display: "grid", gap: "1rem", placeItems: "start"}}><ButtononClick={() => {setIsOpen(true);}}>Open Sheet</Button><Sheetopen={isOpen}header={<SheetHeadercloseCallback={() => setIsOpen(false)}actions={<SplitButton><Button size={"small"}>Button</Button><Button size={"small"} primaryIcon={<IconExpandDown />}></Button></SplitButton>}>Sheet Title</SheetHeader>}onAbort={() => setIsOpen(false)}><Tile><TileHeader><h2>Overview</h2></TileHeader><TileContent><div style={{display: "flex", flexDirection: "column", gap: "1rem"}}><FormFieldlabel={"Formular Label"}required={true}hint={"This is a hint."}errorMessage={"This is an error message."}><FormSpacing><Input value={"Input 1"} onChange={() => {}}></Input></FormSpacing></FormField><FormFieldlabel={"Formular Label 2"}required={true}hint={"This is a hint. 2"}errorMessage={"This is an error message. 2"}><FormSpacing><Input value={"Input 2"} onChange={() => {}}></Input></FormSpacing></FormField></div></TileContent><TileFooter><ButtononClick={() => {setSmallModalOpen(true);}}>Open Small Modal</Button><Modalopen={smallModalOpen}actions={<ModalActions><Button>Test</Button><Button color={"neutral"}>Test</Button></ModalActions>}modalTitle={<ModalTitleicon={<span style={{color: "var(--color--critical-500)"}}><IconErrorWarning></IconErrorWarning></span>}onAbort={() => setSmallModalOpen(false)}>Test</ModalTitle>}size={"small"}onAbort={() => setSmallModalOpen(false)}>Badge Default</Modal></TileFooter></Tile></Sheet></div>);};

