Skip to Content
🎉 Coral x Panda has been released 🎉 Read the Migration Guide
DocumentationAtomsSkipToContent

SkipToContent

An internal navigation component that help users move around a page.

Basic Usage

import { SkipToContent } from '@krakentech/coral'; const CONTENT_ID = 'main-content'; <SkipToContent id={CONTENT_ID} /> <main id={CONTENT_ID}>Main content</main>

Click here and then press tab to activate the SkipToContent atom.

Properties

id

Declare a constant for the ID, which can be used as a prop for both the Element and the SkipToContent component.

const CONTENT_ID = 'alternative-id'; <SkipToContent id={CONTENT_ID} />

label

<SkipToContent id={CONTENT_ID} label="Alternative label" />

Full API

NameTypeDefault
attributesAttributes

This prop can be used to pass HTML attributes directly to the component. We currently allow passing data-* and aria-* attributes and the id. However, you can pass anything else with a type hack if necessary since this object is despread in to the component, without filtering its content.

Example usage:

AttributesProps: { 'id': 'close-button', 'aria-label': 'Close button', 'data-testid': 'close-button' };
animationResponsiveVariant<ConditionalValue<"pulse" | "wave"> | undefined>

The type of animation. Set as undefined disable.

pulse
variantResponsiveVariant<ConditionalValue<"text" | "rounded" | "circular" | "rectangular"> | undefined>

The variant of the skeleton to use.

text
heightResponsiveVariant<string | number>

Height of the skeleton.

widthResponsiveVariant<string | number>

Width of the skeleton.

aria-labelstring | undefined

A hidden screen-reader label to describe to the user what the skeleton is for.

childrenReactNode
Last updated on