{ "name": "highlight", "snippet": null, "examples": [ { "name": "highlight-basic", "content": "export const HighlightBasic = () => {\n return (\n \n With the Highlight component, you can spotlight words.\n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Highlight } from \"@chakra-ui/react\"" ], "importPath": "import { Highlight } from \"@chakra-ui/react\"" }, { "name": "highlight-multiple", "content": "export const HighlightMultiple = () => {\n return (\n \n \n With the Highlight component, you can spotlight, emphasize and\n accentuate words.\n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Heading, Highlight } from \"@chakra-ui/react\"" ], "importPath": "import { Highlight } from \"@chakra-ui/react\"" }, { "name": "highlight-search-query", "content": "const query = \"spot\"\nconst results = [\"Spotlight bulb\", \"Spot cleaner\", \"Spot ceiling\"]\n\nexport const HighlightSearchQuery = () => {\n return (\n \n Search result for: spot\n \n {results.map((item) => (\n \n \n {item}\n \n \n ))}\n \n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Highlight, Stack, Text } from \"@chakra-ui/react\"" ], "importPath": "import { Highlight } from \"@chakra-ui/react\"" }, { "name": "highlight-with-custom-style", "content": "export const HighlightWithCustomStyle = () => {\n return (\n \n With the Highlight component, you can spotlight words.\n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Highlight } from \"@chakra-ui/react\"" ], "importPath": "import { Highlight } from \"@chakra-ui/react\"" }, { "name": "highlight-with-squiggle", "content": "\"use client\"\nexport const HighlightWithSquiggle = () => {\n const chunks = useHighlight({\n text: \"Endless scale, powered by real humans.\",\n query: [\"endless\", \"real humans.\"],\n })\n\n return (\n \n {chunks.map((chunk, index) => {\n return chunk.match ? (\n \n {chunk.text}\n \n \n ) : (\n {chunk.text}\n )\n })}\n \n )\n}\n", "hasSnippet": false, "importPaths": [ "import { Heading, Mark, useHighlight } from \"@chakra-ui/react\"", "import { Fragment } from \"react\"" ], "importPath": "import { Highlight } from \"@chakra-ui/react\"" } ] }
\n \n {item}\n \n