{"id":19614376,"url":"https://github.com/samuelscheit/react-native-skia-list","last_synced_at":"2025-05-16T18:06:07.889Z","repository":{"id":257996477,"uuid":"872724701","full_name":"SamuelScheit/react-native-skia-list","owner":"SamuelScheit","description":"The fastest react-native list renderer based on @shopify/react-native-skia","archived":false,"fork":false,"pushed_at":"2025-04-21T01:41:37.000Z","size":89834,"stargazers_count":188,"open_issues_count":4,"forks_count":6,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-16T18:05:05.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://samuelscheit.github.io/react-native-skia-list/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuelScheit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-15T00:48:55.000Z","updated_at":"2025-05-13T22:04:28.000Z","dependencies_parsed_at":"2025-01-18T19:52:24.873Z","dependency_job_id":"d3b1f8e6-8bf3-40d8-a132-357ce51c59bd","html_url":"https://github.com/SamuelScheit/react-native-skia-list","commit_stats":null,"previous_names":["samuelscheit/react-native-skia-list"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelScheit%2Freact-native-skia-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelScheit%2Freact-native-skia-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelScheit%2Freact-native-skia-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelScheit%2Freact-native-skia-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelScheit","download_url":"https://codeload.github.com/SamuelScheit/react-native-skia-list/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582904,"owners_count":22095518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T10:51:48.446Z","updated_at":"2025-05-16T18:06:07.813Z","avatar_url":"https://github.com/SamuelScheit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- ![](./docs/static/img/banner-dark.png#gh-dark-mode-only)\n![](./docs/static/img/banner-light.png#gh-light-mode-only) --\u003e\n\n# React Native Skia List\n\n![](./docs/static/img/banner.png)\n\nReact Native Skia List is a high-performance list component for React Native. \\\nIt is built on top of [@shopify/react-native-skia](https://shopify.github.io/react-native-skia/), a powerful 2D graphics library designed to be fast and customizable.\n\n## Installation\n\n\u003e [!CAUTION]\n\u003e This library is in early development and not ready for production use.\n\n```sh\nyarn add react-native-skia-list @shopify/react-native-skia react-native-keyboard-controller react-native-reanimated react-native-gesture-handler\n```\n\n## [Documentation](https://samuelscheit.github.io/react-native-skia-list/)\n\nYou can achieve good looking, interactive and high-performance lists with a lot of items like the following example:\n\n\u003ca href=\"https://samuelscheit.github.io/react-native-skia-list/#demo\"\u003e\n\t\u003cimg width=\"230\" src=\"./docs/static/demo.gif\" /\u003e\n\u003c/a\u003e\n\n## Usage\n\n```tsx\n// needed for SkiaDomApi type\nimport type {} from \"@shopify/react-native-skia/lib/typescript/src/renderer/HostComponents\";\nimport { Skia } from \"@shopify/react-native-skia\";\nimport { SkiaFlatList } from \"react-native-skia-list\";\nimport { useSafeAreaInsets } from \"react-native-safe-area-context\";\nimport { GestureHandlerRootView } from \"react-native-gesture-handler\";\nimport { KeyboardProvider } from \"react-native-keyboard-controller\";\n\n// Create a Skia ParagraphBuilder that will be used to build the text for each item\nconst paragraphBuilder = Skia.ParagraphBuilder.Make({\n\ttextStyle: {\n\t\tcolor: Skia.Color(\"black\"),\n\t\tfontSize: 20,\n\t},\n});\n\nexport default function Test() {\n\tconst safeArea = useSafeAreaInsets();\n\n\treturn (\n\t\t\u003cKeyboardProvider\u003e\n\t\t\t\u003cGestureHandlerRootView style={{ flex: 1 }}\u003e\n\t\t\t\t\u003cSkiaFlatList\n\t\t\t\t\tsafeArea={safeArea}\n\t\t\t\t\t// Provide an initialData array that can be serialized and passed to the worklet thread\n\t\t\t\t\tinitialData={() =\u003e [0, 1, 2, 3, 4, 5, 6, 7, 8]}\n\t\t\t\t\t// To optimize performance for the initial mount you can provide a transformItem function\n\t\t\t\t\t// It will be called once for each item when it is mounted the first time\n\t\t\t\t\ttransformItem={(item, index, id, state) =\u003e {\n\t\t\t\t\t\t\"worklet\";\n\n\t\t\t\t\t\tparagraphBuilder.reset(); // reuses the paragraphBuilder for each item\n\t\t\t\t\t\tconst text = `Item ${item}`;\n\n\t\t\t\t\t\treturn paragraphBuilder.addText(text).build();\n\t\t\t\t\t}}\n\t\t\t\t\t// renderItem will be called whenever an item visibility changes\n\t\t\t\t\trenderItem={(item, index, state, element) =\u003e {\n\t\t\t\t\t\t\"worklet\";\n\n\t\t\t\t\t\tconst { width } = state.layout.value;\n\n\t\t\t\t\t\titem.layout(width); // calculates the paragraph layout\n\n\t\t\t\t\t\tconst height = item.getHeight(); // gets the height of the paragraph\n\n\t\t\t\t\t\t// element is a Skia.GroupNode or will be undefined if only the height of the element is needed\n\t\t\t\t\t\tif (!element) return height;\n\n\t\t\t\t\t\telement.addChild(\n\t\t\t\t\t\t\t// see the following link for all element types\n\t\t\t\t\t\t\t// https://github.com/Shopify/react-native-skia/blob/5c38b27d72cea9c158290adb7d23c6109369ac2f/packages/skia/src/renderer/HostComponents.ts#L72-L191\n\t\t\t\t\t\t\tSkiaDomApi.ParagraphNode({\n\t\t\t\t\t\t\t\tparagraph: item,\n\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\ty: 0,\n\t\t\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn height;\n\t\t\t\t\t}}\n\t\t\t\t/\u003e\n\t\t\t\u003c/GestureHandlerRootView\u003e\n\t\t\u003c/KeyboardProvider\u003e\n\t);\n}\n```\n\n## Contributing\n\nSee the [contributing guide](https://github.com/SamuelScheit/react-native-skia-list/blob/main/CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelscheit%2Freact-native-skia-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelscheit%2Freact-native-skia-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelscheit%2Freact-native-skia-list/lists"}