Official

ui

The look of the app's components: buttons, list rows, cards, settings, callouts, and the blocks and tables of replies. Edit a component here and the whole app draws with it.

The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/ui@0.1.1

Permissions in 0.1.1

  • Change app settings settings.writeHighChanges the app settings.Apply the components' look to the window

Files

components/setting.tsx2 KB
/** @jsxRuntime classic */
/** @jsx template */
// A setting: its title and description, and the control (the children)
// beside them, or under them when `stacked`. `wide` gives a control with
// no width of its own (a text field) 260px; `heading` makes it the title
// of the card below it, lined up with the text of the card's rows.
import { FILL, prop, when, type Definition, template } from "../define.ts";

export const setting: Definition = {
  props: { title: "", description: null, stacked: false, wide: false, heading: false },
  template: (
    <div display="flex" flexDirection="row" alignItems="center" gap={16} width="fill" paddingX="density.settingPadding" $when={[
          when("!heading", { paddingY: "density.settingPadding" }),
          when("stacked", { flexDirection: "column", alignItems: "stretch", gap: 8 }),
          when("heading", {
            paddingX: "density.settingPadding + 4",
            paddingTop: "density.settingPadding * 0.5",
            paddingBottom: "density.settingPadding * 0.5 + 2",
          }),
        ]}>
      <div display="flex" flexDirection="column" gap={2} {...FILL}>
          <text text={prop("title")} fontSize="type.strongSize" fontWeight={600} color="foreground" />
          <text $if="description" text={prop("description")} fontSize="type.descriptionSize" color="mutedForeground" />
        </div>
      <div $if="children" display="flex" $when={[
                when(["!stacked", "!wide"], {
                  flexDirection: "row",
                  alignItems: "center",
                  gap: 6,
                  flexGrow: 0,
                  flexShrink: 0,
                }),
                when(["wide", "!stacked"], {
                  flexDirection: "column",
                  alignItems: "stretch",
                  width: 260,
                  flexGrow: 0,
                  flexShrink: 0,
                }),
                when("stacked", { flexDirection: "column", width: "fill" }),
              ]}><slot /></div>
    </div>
  ),
};

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.1.2latestNov 21, 2026>=5 <610.6 KB1 permissionListed
0.1.1Nov 16, 2026>=5 <610.2 KB1 permissionListed
0.1.0Nov 9, 2026>=5 <68.8 KB1 permissionListed

Reviews and comments

0 threads · 0 reviews

No comments yet.