SGUI / Development
Popover
Anchored supplementary content with keyboard dismissal.
Loading examples…
Loading examples…
Examples
Loading examples…
Contains
No fixed SGUI child components.
Component documentation
SGUI / Development
Anchored supplementary content with keyboard dismissal.
Loading examples…
Loading examples…
Loading examples…
No fixed SGUI child components.
Anchored supplementary content with keyboard dismissal.
'use client';
import { useState } from 'react';
import { ThemeScope } from '@structured-growth/sg-ui/theme';
import { Popover, Stack, Typography, Button } from '@structured-growth/sg-ui/experimental';
export default function PopoverPlaygroundExample() {
const [action, setAction] = useState("No action yet");
const [open, setOpen] = useState(false);
const [page, setPage] = useState(0);
const [pageSize, setPageSize] = useState(25);
const [selected, setSelected] = useState("overview");
return (
<>
<ThemeScope density="comfortable">
<Popover presentation="popover" showTitle={true} title={"Course details"} placement={"bottom start"} size={"md"} trigger={<Button variant="outlined">Show details</Button>}><Stack gap={3}><Typography>12 lessons · Updated today</Typography><Button onPress={() => setAction("Added to reading list")}>Add to reading list</Button></Stack></Popover>
</ThemeScope>
</>
);
}
The same props in independent density scopes.
'use client';
import { useState } from 'react';
import { ThemeScope } from '@structured-growth/sg-ui/theme';
import { Popover, Stack, Typography, Button } from '@structured-growth/sg-ui/experimental';
export default function PopoverPlaygroundDensitiesExample() {
const [action, setAction] = useState("No action yet");
const [open, setOpen] = useState(false);
const [page, setPage] = useState(0);
const [pageSize, setPageSize] = useState(25);
const [selected, setSelected] = useState("overview");
return (
<>
<Stack gap={3}>
<ThemeScope density="compact"><Popover title={"Course details"} placement={"bottom start"} size={"md"} trigger={<Button variant="outlined">Show details</Button>}><Stack gap={3}><Typography>12 lessons · Updated today</Typography><Button onPress={() => setAction("Added to reading list")}>Add to reading list</Button></Stack></Popover></ThemeScope>
<ThemeScope density="comfortable"><Popover title={"Course details"} placement={"bottom start"} size={"md"} trigger={<Button variant="outlined">Show details</Button>}><Stack gap={3}><Typography>12 lessons · Updated today</Typography><Button onPress={() => setAction("Added to reading list")}>Add to reading list</Button></Stack></Popover></ThemeScope>
</Stack>
</>
);
}