Skip to content

Call to Action (CTA)

The <ShowcaseCTA> component can be used to create a call to action to encourage users to contribute to your showcase page.

Import

import { ShowcaseCTA } from 'starlight-showcases'

Usage

Pass the content of the CTA as children of the <ShowcaseCTA> component to create a call to action. You can nest any other Markdown content inside a CTA.

src/content/docs/showcase.mdx
import { ShowcaseCTA } from 'starlight-showcases'
<ShowcaseCTA>
Have you built a showcase page? [Open a
PR](https://github.com/HiDeoo/starlight-showcases) to add it to the list!
</ShowcaseCTA>

The above code generates the following on the page:

Custom CTA title

You can customize the title of the CTA by specifying it using the title prop.

src/content/docs/showcase.mdx
import { ShowcaseCTA } from 'starlight-showcases'
<ShowcaseCTA title="Let us know!">
Have you built a showcase page? [Open a
PR](https://github.com/HiDeoo/starlight-showcases) to add it to the list!
</ShowcaseCTA>

The above code generates the following on the page:

Props

The <ShowcaseCTA> component accepts the following props:

title

type: string
default: 'Add your own!'

The title of the CTA. See the Custom CTA title section for an example.