Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
docs(open-knowledge): regenerate component reference for Toggle (#3178)
Abrahama39351c18dc4
diff --git a/docs/content/reference/components/accordion.mdx b/docs/content/reference/components/accordion.mdxindex c4a6e8181..51ab289bb 100644--- a/docs/content/reference/components/accordion.mdx+++ b/docs/content/reference/components/accordion.mdx@@ -1,7 +1,7 @@---title: "Accordion"description: "Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX"-keywords: "toggle, accordion, expandable, details, disclosure, collapse, fold"+keywords: "accordion, expandable, details, disclosure, collapse, fold"---## Example@@ -58,8 +58,8 @@ keywords: "toggle, accordion, expandable, details, disclosure, collapse, fold"}}/>-_Also matches:_ `toggle`, `accordion`, `expandable`, `details`, `disclosure`, `collapse`, `fold`+_Also matches:_ `accordion`, `expandable`, `details`, `disclosure`, `collapse`, `fold`## Author it-Type `/toggle` in the editor to insert it from the slash menu, or write the tag directly in source mode. The Properties panel on the right of the editor exposes every prop above as a form field once the block is selected.+Type `/accordion` in the editor to insert it from the slash menu, or write the tag directly in source mode. The Properties panel on the right of the editor exposes every prop above as a form field once the block is selected.diff --git a/docs/content/reference/components/meta.json b/docs/content/reference/components/meta.jsonindex 8edca9e25..67d7cbcfa 100644--- a/docs/content/reference/components/meta.json+++ b/docs/content/reference/components/meta.json@@ -5,6 +5,7 @@"index","callout","accordion",+ "toggle","tabs","math","mermaid-fence",@@ -14,6 +15,7 @@"pdf","file","embed",- "mirror"+ "mirror",+ "html-align-block"]}diff --git a/docs/content/reference/components/toggle.mdx b/docs/content/reference/components/toggle.mdxnew file mode 100644index 000000000..c9164cb32--- /dev/null+++ b/docs/content/reference/components/toggle.mdx@@ -0,0 +1,65 @@+---+title: "Toggle"+description: "Standalone expand/collapse block (Notion-style). Same render + props as `<Accordion>` — pick whichever vocabulary matches the vault"+keywords: "toggle, collapsible, expand, details, disclosure, fold"+---++## Example++<ComponentPreview>+ <AccordionPreview title="Show me the details" description="Click to expand" icon="lucide:BookOpen">+ Native `<details>` under the hood — same substrate as the app render.+ Pass a shared `name` to sibling accordions and the browser will keep+ only one open at a time.+ </AccordionPreview>+</ComponentPreview>++```mdx+<Toggle title="Title">+ Body content revealed when the toggle is expanded.+</Toggle>+```++## Props++<TypeTable+ type={{+ "title": {+ description: "Accordion heading shown inside the <summary>",+ type: "string",+ required: true,+ },+ "defaultOpen": {+ description: "When true, the accordion renders expanded on initial load",+ type: "boolean",+ required: false,+ default: "false",+ },+ "icon": {+ description: "Custom lucide icon override (e.g. \\`lucide:Rocket\\`)",+ type: "string",+ required: false,+ },+ "description": {+ description: "Optional subtitle rendered below the title inside <summary>",+ type: "string",+ required: false,+ },+ "id": {+ description: "HTML id attribute for deep-linking (e.g. \\`#advanced-options\\`)",+ type: "string",+ required: false,+ },+ "name": {+ description: "HTML5 <details name=> group — siblings with the same name are mutually exclusive",+ type: "string",+ required: false,+ },+}}+/>++_Also matches:_ `toggle`, `collapsible`, `expand`, `details`, `disclosure`, `fold`++## Author it++Type `/toggle` in the editor to insert it from the slash menu, or write the tag directly in source mode. The Properties panel on the right of the editor exposes every prop above as a form field once the block is selected.diff --git a/docs/scripts/generate-component-docs.ts b/docs/scripts/generate-component-docs.tsindex 1b84a69c6..535f39515 100644--- a/docs/scripts/generate-component-docs.ts+++ b/docs/scripts/generate-component-docs.ts@@ -28,6 +28,7 @@ const OUT_DIR = path.resolve(HERE, '../content/reference/components');const PAGE_ORDER = ['Callout','Accordion',+ 'Toggle','Tabs','Math','MermaidFence',@@ -272,6 +273,13 @@ const PREVIEWS: Partial<Record<string, string>> = {Pass a shared \`name\` to sibling accordions and the browser will keeponly one open at a time.</AccordionPreview>+</ComponentPreview>`,+ Toggle: `<ComponentPreview>+ <AccordionPreview title="Show me the details" description="Click to expand" icon="lucide:BookOpen">+ Native \`<details>\` under the hood — same substrate as the app render.+ Pass a shared \`name\` to sibling accordions and the browser will keep+ only one open at a time.+ </AccordionPreview></ComponentPreview>`,Tabs: `<ComponentPreview><TabsPreview>@@ -360,6 +368,7 @@ function placeholderBody(name: string): string {return '<Tab label="First">First panel</Tab>\n <Tab label="Second">Second panel</Tab>';if (name === 'Tab') return 'Panel body content.';if (name === 'Accordion') return 'Body content — hidden until the summary is clicked.';+ if (name === 'Toggle') return 'Body content — hidden until the summary is clicked.';if (name === 'Callout') return 'Content of the callout goes here.';if (name === 'MirrorSource') return 'The canonical content this block owns.';return 'Content goes here.';