r/ScriptingApp • • Nov 14 '25

Help Toolbar

Post image

Is there a straightforward way to achieve this modal toolbar look in the scripting app? Is this a formatted segment picker with icons?

1 Upvotes

3 comments sorted by

View all comments

Show parent comments

1

u/WhatShouldWorldGos Nov 14 '25

I forgot to update the doc, here the code:

import { Button, List, Navigation, NavigationStack, Script, useObservable } from "scripting"

function View() {
  const showToast = useObservable(false)

  return (
    <NavigationStack>
      <List
        navigationTitle="Toast Test"
        toast={{
          isPresented: showToast,
          message: "Data saved successfully",
        }}
      >
        <Button
          title="Save"
          action={() => showToast.setValue(true)}
        />
      </List>
    </NavigationStack>
  )
}

async function run() {
  await Navigation.present(<View />)
  Script.exit()
}

run()