{"id":20961664,"url":"https://github.com/elchininet/keep-texts-in-tabs","last_synced_at":"2025-05-14T07:30:56.358Z","repository":{"id":190998028,"uuid":"683553739","full_name":"elchininet/keep-texts-in-tabs","owner":"elchininet","description":"Keep texts in Home Assistant dashboards tabs when icons are added to them","archived":false,"fork":false,"pushed_at":"2025-05-04T13:26:52.000Z","size":1272,"stargazers_count":40,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-04T14:26:13.276Z","etag":null,"topics":["custom-plugin","hacs","hacs-default","hacs-plugin","home-assistant","keep-texts-in-tabs","plugin","tabs-management","tabs-texts"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elchininet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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},"funding":{"github":["elchininet"]}},"created_at":"2023-08-27T00:09:45.000Z","updated_at":"2025-05-04T13:25:15.000Z","dependencies_parsed_at":"2023-11-27T00:21:46.244Z","dependency_job_id":"a8d748f2-d97b-4b3c-b6b1-c331d842fc86","html_url":"https://github.com/elchininet/keep-texts-in-tabs","commit_stats":{"total_commits":54,"total_committers":2,"mean_commits":27.0,"dds":"0.14814814814814814","last_synced_commit":"6145f1aa9e270784d6d6bd8c2524c87941bef287"},"previous_names":["elchininet/keep-texts-in-tabs"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elchininet%2Fkeep-texts-in-tabs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elchininet%2Fkeep-texts-in-tabs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elchininet%2Fkeep-texts-in-tabs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elchininet%2Fkeep-texts-in-tabs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elchininet","download_url":"https://codeload.github.com/elchininet/keep-texts-in-tabs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254094819,"owners_count":22013648,"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":["custom-plugin","hacs","hacs-default","hacs-plugin","home-assistant","keep-texts-in-tabs","plugin","tabs-management","tabs-texts"],"created_at":"2024-11-19T02:15:12.510Z","updated_at":"2025-05-14T07:30:56.339Z","avatar_url":"https://github.com/elchininet.png","language":"TypeScript","funding_links":["https://github.com/sponsors/elchininet"],"categories":[],"sub_categories":[],"readme":"# Keep Texts in Tabs\n\n#### Keep texts in Home Assistant dashboards tabs when icons are added to them\n\n[![hacs_badge](https://img.shields.io/badge/HACS-Default-41BDF5.svg)](https://github.com/hacs/integration)\n[![Test](https://github.com/elchininet/keep-texts-in-tabs/actions/workflows/test.yaml/badge.svg)](https://github.com/elchininet/keep-texts-in-tabs/actions/workflows/test.yaml)\n[![Coverage Status](https://coveralls.io/repos/github/elchininet/keep-texts-in-tabs/badge.svg?branch=master)](https://coveralls.io/github/elchininet/keep-texts-in-tabs?branch=master)\n[![release](https://img.shields.io/github/v/release/elchininet/keep-texts-in-tabs.svg)](https://github.com/elchininet/keep-texts-in-tabs/releases)\n[![downloads](https://img.shields.io/github/downloads/elchininet/keep-texts-in-tabs/total)](https://github.com/elchininet/keep-texts-in-tabs/releases)\n\n[![Home Assistant Nightly Beta Tests](https://github.com/elchininet/keep-texts-in-tabs/actions/workflows/ha-beta-tests.yaml/badge.svg)](https://github.com/elchininet/keep-texts-in-tabs/actions/workflows/ha-beta-tests.yaml)\n\nIn [Home Assistant] it is possible to create different [views] in a dashboard, each view will be accesible with a tab.\n\n![image](images/header-texts.png)\n\nIt is possible also, to add an icon to a view, and in that case, [the icon will be shown instead of the text](https://www.home-assistant.io/dashboards/views#view-icon) and the text will be used as the title of the icon.\n\n![image](images/header-icons.png)\n\nHowever, it is not possible to have both, icons and texts, –something that it is rather basic–, one needs to chose between the both. This is when `keep-texts-in-tabs` comes to scene, this plugin makes it possible to keep the text and the icon in dashboard tabs.\n\n![image](images/header-texts-and-icons.png)\n\n\u003eThis feature was available before in [custom-header], this plugin is not aimed to replace `custom-header`, but to bring only the functionality of showing texts in views with icons, and no more.\n\n## Installation\n\nYou need to install the plugin through [HACS] or manually, not both. If you install the plugin using the two installations methods you could have issues or errors.\n\n### Through HACS\n\n#### Go to the HACS plugin's page\n\nIf you have not disabled the [My Home Assistant] integration, just click on [this link](https://my.home-assistant.io/redirect/hacs_repository/?owner=elchininet\u0026repository=keep-texts-in-tabs\u0026category=plugin) to go to the plugin's page, otherwise follow the next steps:\n\n1. Go to `HACS` dashboard\n2. Search for `keep-texts-in-tabs` and click on it\n\n#### Install the plugin\n\n1. On the plugin page, click on the `Download` yellow button in the bottom-right corner\n2. Click on `Download` in the more-info dialog\n\n#### If you are in storage mode (default mode)\n\nThat‘s it, you have properly installed the plugin\n\n#### If you are in yaml mode\n\n1. Go to your `configuration.yaml`\n2. Add the URL to the installed plugin under the `extra_module_url` array of the `frontend` section\n\n```yaml\nfrontend:\n  extra_module_url:\n    - /hacsfiles/keep-texts-in-tabs/keep-texts-in-tabs.js\n```\n\n### Manual installation\n\n1. Download `keep-texts-in-tabs.js` from [the releases page](https://github.com/elchininet/keep-texts-in-tabs/releases/latest)\n2. Put it inside your `config/www` folder\n3. Reference the file from your dashboards depending on your dashboard management method described below:\n\n#### If you are in storage mode (default mode)\n\n1. Go to `Settings \u003e Dashboards`\n2. Click on the three dots located on the top-right corner and then click on `Resources`\n3. Click on `ADD RESOURCE` on the bottom-right of the screen\n4. Add the URL to the file that you have downloaded previously (e.g `/local/keep-texts-in-tabs.js?v=1.0.0`)\n5. Make sure you add the correct version at the end of the URL (e.g. `?v=1.0.0`) because in this way you make Home Assistant to load the new version instead of a version stored in cache\n\n#### If you are in yaml mode\n\n1. Go to your `configuration.yaml`\n2. Add the URL to the file that you have previously downloaded under the `extra_module_url` array of the `frontend` section\n\n```yaml\nfrontend:\n  extra_module_url:\n    - /local/keep-texts-in-tabs.js?v=1.0.0\n```\n\n4. Make sure you add the correct version at the end of the URL (e.g. `?v=1.0.0`) because in this way you make Home Assistant to load the new version on each update instead of a version stored in cache\n\n## Configuration\n\nConfiguration also depends on your dashboard management method:\n\n#### If you are in storage mode (default mode)\n\n1. Go to the dashboard in which you want to add the configuration\n2. Click on the pencil icon located on the top-right corner (`Edit dashboard`)\n3. Click on the three dots located on the top-right corner and then click on `Raw configuration editor`\n4. Add the configuration at the very beginning of the the code\n\n#### If you are in yaml mode\n\n1. Go to the dashboard yaml file in which you want to add the configuration\n4. Add the configuration at the very beginning of the the code\n\n## Configuration options\n\nBy default, if you enable `keep-texts-in-tabs`, all the views that are using icons, will have the proper text after the icon in the tabs, but you can customise it with some options.\n\n### enabled\n\nEnables the plugin, if you do not set this option, the tabs will not be affected.\n\n| Values   | Default | Description                     |\n| -------- | ------- | ------------------------------- |\n| `true`   | no      | Enables the plugin              |\n| `false`  | yes     | Disables the plugin             |\n\n#### Example\n\n```yaml\nkeep_texts_in_tabs:\n  enabled: true\n```\n\n![image](images/header-texts-and-icons.png)\n\n### position\n\nControls the text position with repect to the icon\n\n| Values   | Default | Description                     |\n| -------- | ------- | ------------------------------- |\n| `after`  | yes     | Places the text after the icon  |\n| `before` | no      | Places the text before the icon |\n\n#### Example\n\n```yaml\nkeep_texts_in_tabs:\n  enabled: true\n  position: before\n```\n\n![image](images/options/before.png)\n\n---\n\n### include\n\nControl which tabs will be the ones affected by the plugin\n\n#### Example\n\n```yaml\nkeep_texts_in_tabs:\n  enabled: true\n  include:\n    - Muziek\n    - Alarmen\n```\n\n![image](images/options/include.png)\n\n---\n\n### exclude\n\nControl which tabs will not be affected by the plugin\n\n#### Example\n\n```yaml\nkeep_texts_in_tabs:\n  enabled: true\n  exclude:\n    - Windy\n    - Planten\n```\n\n![image](images/options/exclude.png)\n\n\u003eNote: you cannot have `include` and `exclude` parameters at the same time in a configuration, if you do that, you will get an error.\n\n---\n\n### override\n\nOverrides the global position of the text in certain tabs (if the global option is `after`, it will force the position to `before` on the selected tabs and vice versa)\n\n#### Example\n\n```yaml\nkeep_texts_in_tabs:\n  enabled: true\n  position: before\n  override:\n    - Muziek\n    - Planten\n```\n\n![image](images/options/override.png)\n\n### text_transform\n\nSet the text transformation. Allowed values are `capitalize` (which is the default value and sets the first character in capital letter), `uppercase` (which converts the whole text to uppercase) and `lowercase` (which converts the whole text to lowercase).\n\n#### Examples\n\n```yaml\nkeep_texts_in_tabs:\n  enabled: true\n  text_transform: lowercase\n```\n\n![image](images/options/lowercase.png)\n\n```yaml\nkeep_texts_in_tabs:\n  enabled: true\n  text_transform: uppercase\n```\n\n![image](images/options/uppercase.png)\n\n---\n\n### mobile_config\n\nIf this options is not used, the same configuration will be used for desktop and mobile devices. If it is used, it allows one to set a special configuration only for mobile (all the previous options will be available)\n\n#### Example\n\n```yaml\nkeep_texts_in_tabs:\n  enabled: true\n  mobile_config:\n    enabled: false  \n```\n\n### mobile_screen_width\n\nThis option can only be placed inside `mobile_config`. By default, mobile devices will be those with screen sizes equal or below `640px`. This options allows one to select a different value.\n\n#### Example\n\n```yaml\nkeep_texts_in_tabs:\n  enabled: true\n  position: before\n  mobile_config:\n    enabled: false\n    mobile_screen_width: 340\n```\n\n[Home Assistant]: https://www.home-assistant.io/\n[My Home Assistant]: https://www.home-assistant.io/integrations/my/\n[custom-header]: https://github.com/maykar/custom-header\n[views]: https://www.home-assistant.io/dashboards/views\n[HACS]: https://hacs.xyz","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felchininet%2Fkeep-texts-in-tabs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felchininet%2Fkeep-texts-in-tabs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felchininet%2Fkeep-texts-in-tabs/lists"}