{"id":28190007,"url":"https://github.com/typescene/typescene-web-nav","last_synced_at":"2025-05-16T10:11:58.153Z","repository":{"id":47810540,"uuid":"165974940","full_name":"typescene/typescene-web-nav","owner":"typescene","description":"Typescene web app navigation components ","archived":false,"fork":false,"pushed_at":"2021-08-12T20:57:14.000Z","size":152,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T08:18:13.754Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/typescene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-16T04:42:01.000Z","updated_at":"2021-05-06T15:40:17.000Z","dependencies_parsed_at":"2022-09-26T16:21:02.468Z","dependency_job_id":null,"html_url":"https://github.com/typescene/typescene-web-nav","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescene%2Ftypescene-web-nav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescene%2Ftypescene-web-nav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescene%2Ftypescene-web-nav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescene%2Ftypescene-web-nav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typescene","download_url":"https://codeload.github.com/typescene/typescene-web-nav/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509455,"owners_count":22082896,"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":"2025-05-16T10:11:55.963Z","updated_at":"2025-05-16T10:11:58.146Z","avatar_url":"https://github.com/typescene.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescene web app navigation components\n\nThis package contains the following components:\n\n- `AppLayout` and friends:\n  - `AppDrawer`\n  - `AppHeader`\n  - `AppMenuButton`\n  - `AppTitle`\n  - `AppToolbar`\n- `TabBar`, and\n  - `TabBarButton`\n\n\u003e **Note:** The names above are for the JSX tags. If your code does not use JSX (i.e. `.tsx` files), then the same names will still work, but you can also import the corresponding `...View` components instead.\n\n## Installation\n\n**Note:** This component requires [Typescene](https://github.com/typescene/typescene) along with `@typescene/webapp`.\n\nInstall the NPM package first:\n\n`npm i -D @typescene/web-nav`\n\nThen import any of the classes using an import statement such as:\n\n`import { AppLayoutView } from \"@typescene/web-nav\"`\n\n## Example\n\nThe following example demonstrates how the `AppLayout` component can be used with JSX-style code:\n\n```jsx\nconst myAppView = (\n  \u003cAppLayout\u003e\n    {/* Drawer, automatically shown using AppMenuButton */}\n    \u003cAppDrawer\u003e\n      \u003cflowcell dimensions={{ height: 180 }}\u003e\n        \u003crow\u003e{/* drawer header */}\u003c/row\u003e\n      \u003c/flowcell\u003e\n      \u003cscrollcontainer\u003e\n        \u003cflowcell\u003e\n          \u003crow\u003e{/* scrollable area */}\u003c/row\u003e\n        \u003c/flowcell\u003e\n      \u003c/scrollcontainer\u003e\n    \u003c/AppDrawer\u003e\n\n    {/* Fixed header bar */}\n    \u003cAppHeader\u003e\n      \u003cAppMenuButton /\u003e\n      \u003cAppTitle\u003eTitle\u003c/AppTitle\u003e\n      \u003cAppToolbar\u003e\n        \u003ciconbutton icon=\"...\"\u003e\n        {/* buttons... */}\n      \u003c/AppToolbar\u003e\n    \u003c/AppHeader\u003e\n\n    {/* Remaining content... */}\n    \u003cflowcell padding={16}\u003e\n      \u003ccenterrow\u003e\n        \u003cp\u003eHello, world!\u003c/p\u003e\n      \u003c/centerrow\u003e\n    \u003c/flowcell\u003e\n  \u003c/AppLayout\u003e\n);\n```\n\nTabs can be used as follows (note that the tab 'content' is not part of the tab bar component, so you can use e.g. a state property on the Activity class to toggle between content views directly below the tab bar):\n\n```jsx\n(\n  \u003cTabBar\u003e\n    \u003cTabBarButton onSelect=\"...\" selected\u003e\n      First tab\n    \u003c/TabBarButton\u003e\n    \u003cTabBarButton onSelect=\"...\"\u003e\n      Second tab\n    \u003c/TabBarButton\u003e\n  \u003c/TabBar\u003e\n  {/* ... put tab content here ... */}\n)\n```\n\n## Demo\n\nThe `demo/` folder contains more examples that show how to use these components.\n\n\u003cimg src=\"screenshot.png\" alt=\"Screenshot\" width=\"500\" style=\"width: 500px\" /\u003e\n\nTo run the demo, clone the source repository and run the following commands in the terminal:\n\n```bash\nnpm install\nnpm run build\ncd demo\nnpm install\nnpm start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypescene%2Ftypescene-web-nav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypescene%2Ftypescene-web-nav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypescene%2Ftypescene-web-nav/lists"}