Skip to content

Tag values as links #151

Answered by csandman
subzero79 asked this question in Q&A
Discussion options

You must be logged in to vote

If by tag you mean the selected options in the select bar, then yeah here's an example of how you could do that:

import NextLink from "next/link";
import { Container, FormControl, FormLabel, Link } from "@chakra-ui/react";
import { Select, chakraComponents } from "chakra-react-select";

export const flavorOptions = [
  { value: "vanilla", label: "Vanilla", href: "/test" },
  { value: "chocolate", label: "Chocolate", href: "/test" },
  { value: "strawberry", label: "Strawberry", href: "/test" },
  { value: "salted-caramel", label: "Salted Caramel", href: "/test" }
];

const components = {
  MultiValueLabel: ({ data, ...props }) => (
    <NextLink href={data.href} passHref>
      <Link>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by csandman
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants