SGUI / Development
Split action
A primary command and secondary menu share a neutral action group.
Loading examples…
Loading examples…
Examples
Loading examples…
Used In
No direct parents in the documented component catalog.
Component documentation
SGUI / Development
A primary command and secondary menu share a neutral action group.
Loading examples…
Loading examples…
Loading examples…
No direct parents in the documented component catalog.
A primary command and secondary menu share a neutral action group.
'use client';
import { useState } from 'react';
import { ThemeScope } from '@structured-growth/sg-ui/theme';
import { SplitAction, Stack, Typography, Button } from '@structured-growth/sg-ui/experimental';
export default function SplitActionPlaygroundExample() {
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">
<Stack gap={3}><SplitAction label={"Save course"} disabled={false} loading={false} items={[{id:"draft",label:"Save draft"},{id:"copy",label:"Save a copy"}]} onPress={() => setAction("Saved locally")} onAction={setAction} /></Stack>
</ThemeScope>
</>
);
}
The same props in independent density scopes.
'use client';
import { useState } from 'react';
import { ThemeScope } from '@structured-growth/sg-ui/theme';
import { SplitAction, Stack, Typography, Button } from '@structured-growth/sg-ui/experimental';
export default function SplitActionPlaygroundDensitiesExample() {
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"><Stack gap={3}><SplitAction label={"Save course"} disabled={false} loading={false} items={[{id:"draft",label:"Save draft"},{id:"copy",label:"Save a copy"}]} onPress={() => setAction("Saved locally")} onAction={setAction} /></Stack></ThemeScope>
<ThemeScope density="comfortable"><Stack gap={3}><SplitAction label={"Save course"} disabled={false} loading={false} items={[{id:"draft",label:"Save draft"},{id:"copy",label:"Save a copy"}]} onPress={() => setAction("Saved locally")} onAction={setAction} /></Stack></ThemeScope>
</Stack>
</>
);
}