All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.esm.components.skip-nav.skip-nav-link.js Maven / Gradle / Ivy

Go to download

Responsive and accessible React UI components built with React and Emotion

The newest version!
"use strict";
"use client";
import { jsx } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import { chakra } from '../../styled-system/factory.js';
import { useRecipe } from '../../styled-system/use-recipe.js';

const fallbackId = "chakra-skip-nav";
const SkipNavLink = forwardRef(
  function SkipNavLink2(props, ref) {
    const recipe = useRecipe({ key: "skipNavLink", recipe: props.recipe });
    const [variantProps, localProps] = recipe.splitVariantProps(props);
    const styles = recipe(variantProps);
    localProps.id || (localProps.id = fallbackId);
    return /* @__PURE__ */ jsx(
      chakra.a,
      {
        ...localProps,
        ref,
        href: `#${localProps.id}`,
        css: [styles, props.css]
      }
    );
  }
);

export { SkipNavLink, fallbackId };




© 2015 - 2025 Weber Informatics LLC | Privacy Policy