Grok Settings
brainless/grok-settingsFreeComponent
Settings modal (F2) — Appearance / Mouse sections with ▸ rows, on/off values, and nested › pickers.
Install it
npx shadcn@latest add https://brainless.swerdlow.dev/r/grok-settings.jsonSource
1"use client";23import * as React from "react";4import { cn } from "@/lib/utils";56/**7 * GrokSettings — Grok CLI's Settings modal (F2 / Ctrl+,).8 *9 * Captured grammar (v0.2.93): section headers (`Appearance`, `Mouse`), rows10 * with a `▸` marker, current value on the right (`on` / `off` / theme name ›).11 */12const BORDER = "#505058";13const FG = "#e1e1e1";14const MUTED = "#8b8b90";15const DIM = "#6c6c6c";1617export type GrokSettingValue = string | boolean;1819export type GrokSetting = {20 id: string;21 label: string;22 value: GrokSettingValue;23 /** Show a › affordance (nested picker). */24 expandable?: boolean;25};2627export type GrokSettingSection = {28 id: string;29 label: string;30 items: GrokSetting[];31};3233const DEFAULT_SECTIONS: GrokSettingSection[] = [34 {35 id: "appearance",36 label: "Appearance",37 items: [38 { id: "compact", label: "Compact mode", value: false },39 { id: "timestamps", label: "Show timestamps", value: true },40 { id: "vim-input", label: "Disable vim input mode", value: true },41 { id: "vim-scroll", label: "Vim scrollback navigation", value: false },42 { id: "theme", label: "Theme", value: "Grok Night", expandable: true },43 {44 id: "auto-dark",45 label: "Auto dark theme",46 value: "Grok Night",47 expandable: true,48 },49 {50 id: "auto-light",51 label: "Auto light theme",52 value: "Grok Day",53 expandable: true,54 },55 {56 id: "mermaid",57 label: "Render Mermaid diagrams",58 value: "Auto",59 expandable: true,60 },61 { id: "thoughts-width", label: "Max thoughts width", value: "120" },62 { id: "thinking-blocks", label: "Show thinking blocks", value: true },63 { id: "manual-folds", label: "Respect manual folds", value: false },64 { id: "group-tools", label: "Group tool calls", value: true },65 ],66 },67 {68 id: "mouse",69 label: "Mouse",70 items: [71 { id: "mouse-support", label: "Enable mouse support", value: true },72 ],73 },74];7576function formatValue(v: GrokSettingValue) {77 if (typeof v === "boolean") return v ? "on" : "off";78 return v;79}8081export function GrokSettings({82 sections = DEFAULT_SECTIONS,83 defaultActive = "timestamps",84 onClose,85 onToggle,86 className,87}: {88 sections?: GrokSettingSection[];89 defaultActive?: string;90 onClose?: () => void;91 onToggle?: (id: string) => void;92 className?: string;93}) {94 const flat = sections.flatMap((s) => s.items);95// … truncated
Files it writes
More from brainless
All 40 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Claude Diffclaude-diff | brainless | Components | Free | no deps | |
| Claude Headerclaude-header | brainless | Components | Free | no deps | |
| Claude Messageclaude-message | brainless | Components | Free | no deps | |
| Claude Permissionclaude-permission | brainless | Components | Free | no deps | |
| Claude Promptclaude-prompt | brainless | Components | Free | no deps | |
| Claude Slash Menuclaude-slash-menu | brainless | Components | Free | no deps | |
| Claude Thinkingclaude-thinking | brainless | Components | Free | no deps | |
| Claude Todo Listclaude-todo-list | brainless | Components | Free | no deps |
