export const metadata = { title: "Markdown example", description: "An example page to see how to author content in markdown", files: ["path-to-source-file.tsx"], dependencies: [ { name: "@significa/foundations", href: "https://significa.co", }, ], preview: "preview-slug", };
Here's a guide on how to write markdown content using GitHub Flavored Markdown (GFM).
Regular paragraph text with bold text, italic text, and bold italic text.
You can also use strikethrough and underlined text.
Here's a link to GitHub and another link with a title.
Unordered list:
- First item
- Second item
- Nested item
- Another nested item
- Third item
Ordered list:
- First item
- Second item
- Nested item
- Another nested item
- Third item
This is a blockquote It can span multiple lines
And can contain formatted text and links
Here's an example image with alt text:
Here's a paragraph that combines multiple elements:
This is a regular paragraph with a link, some bold text, and strikethrough. You can also add inline code
or emphasize certain words.
Note: Blockquotes can contain lists too:
- Item one
- Item two
Prop | Type | Default | Description |
---|---|---|---|
variant |
string |
primary |
The visual style variant of the button - can be 'primary', 'secondary', 'outline', 'ghost' |
size |
string |
md |
The size of the button - can be 'sm', 'md', 'lg' |
disabled |
boolean |
- | Whether the button is disabled and cannot be interacted with |
loading |
boolean |
- | Whether to show a loading spinner inside the button |
asChild |
boolean |
- | Whether to merge props onto a child element instead of creating a button element |
A bit of text with inline code
.
Another text with javascript inline const a = 1;{:js}
and console.log('hello');{:js}
.
You can:
- Choose language
- Highlight lines
- Highlight words
- Show line numbers (and choose starting line with
showLineNumbers{100}
) - Add a title
- Add a caption
module.exports = {
theme: {
extend: {
keyframes: {
marquee: {
"0%": { transform: "translateX(0%)" },
"100%": { transform: "translateX(-100%)" },
},
},
},
},
plugins: [require("tailwindcss-animate")],
};
The name of the function is getStringLength{:.entity.name.function}
.
See rehype-pretty for more information.
Renders a table of props for a component.
<PropsTable definition={{ variant: { type: ["neutral", "success", "error", "warning", "info"], // can be just a string default: "neutral", // optional description: "The visual style variant of the badge", // optional }, }} />
A simple button component.
Click me
Renders a preview file. Will include a button to see the source code.
Renders a code block with the source code of any file. Can be expandable:
expandable
- if true, the code block will be expandablewithTitle
- if true, the filename will be displayed as the title of the code block