Components
Here you can find a list of all the components which are exported by the starlight-plugin-show-latest-version package.
Version
The Version component is used to display the latest version in a raw format. It doesn’t apply any styling, just the version string in a span element.
import Version from "starlight-plugin-show-latest-version/components/Version.astro";
<Version />You can opt-in to use the server:defer directive to delay rendering until the content of the component is available if a server adapter is configured. This is the recommended approach if your docs do not get rebuilt every time a new version is released.
import Version from "starlight-plugin-show-latest-version/components/Version.astro";
<Version server:defer />While the content is loading you can “slot in” fallback content:
import Version from "starlight-plugin-show-latest-version/components/Version.astro";
<Version server:defer> <span slot="fallback">Loading...</span></Version>VersionBadge
The VersionBadge component is used to display the latest version in a badge format. This component is also used in the site title if you enable showInSiteTitle.
import VersionBadge from "starlight-plugin-show-latest-version/components/VersionBadge.astro";
<VersionBadge />You can opt-in to use the server:defer directive to delay rendering until the content of the component is available if a server adapter is configured. This is the recommended approach if your docs do not get rebuilt every time a new version is released.
import VersionBadge from "starlight-plugin-show-latest-version/components/Version.astro";
<VersionBadge server:defer />While the content is loading you can “slot in” fallback content:
import VersionBadge from "starlight-plugin-show-latest-version/components/Version.astro";
<VersionBadge server:defer> <Badge text={"Loading..."} variant="default" size="medium" slot="fallback" /></VersionBadge>