docs components
Lists your custom components: the ones your MDX pages use as tags, such as <Banner>. push creates or updates by name, so a components folder kept in a repository can be pushed on every commit. See custom components.
octri docs components [list | built-in | show <name> | push <file> | remove <name> --yes]octri docs components built-in
Lists the built-in components, such as Callout and CardGroup. A custom component can't take one of their names.
octri docs components show <name|id>
Prints one component's source, styles and props.
Arguments
<name|id>stringrequiredThe component's name or ID.
octri docs components push <file>
Creates the component, or updates the one with the same name. A .mdx file makes an MDX component. Anything else is the markup of a visual component: one root element, HTML attribute names such as class, props written as {name}, and no imports, exports or functions.
Arguments
<file>pathrequiredA .jsx or .mdx file.
Flags
--name <Name>stringThe tag name. banner.jsx becomes Banner and call-out.mdx becomes CallOut.
--css <file>pathA stylesheet scoped to the component.
--props <props.json>pathThe props it takes, as JSON.
--description <text>stringWhat it's for, shown in API Studio.
octri docs components remove <name|id> --yes
Deletes a component. Pages that use it stop rendering it, so it needs --yes.
Arguments
<name|id>stringrequiredThe component's name or ID.
Flags
--yesbooleanrequiredConfirms the delete.
Examples
List built-in components
octri docs components built-in✔ Loading built-in components
Built-in components (27)
Accordion, AccordionGroup, AccordionItem, Badge, Banner, Button, Callout, Card, CardGroup, Check, CodeGroup, FileTree, Frame, Icon, Image, Info, Note, ParamField, ResponseField, Step, Steps, Tab, Tabs, Tip, Tooltip, Video, Warning
A custom component cannot take one of these names.Push a folder of components
for file in components/*.jsx; do octri docs components push "$file"; doneRelated
octri docs custom-code: Load your own CSS and HTML on every docs page.- Custom components