{"id":13480169,"url":"https://github.com/chrisrowe/tailwindcss-triangle-after","last_synced_at":"2025-04-09T19:40:54.766Z","repository":{"id":57159069,"uuid":"140437601","full_name":"chrisrowe/tailwindcss-triangle-after","owner":"chrisrowe","description":"CSS :after triangle plugin for tailwindcss framework","archived":false,"fork":false,"pushed_at":"2019-04-17T17:01:48.000Z","size":4,"stargazers_count":21,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-06T19:08:18.285Z","etag":null,"topics":["tailwindcss","tailwindcss-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisrowe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-10T13:37:59.000Z","updated_at":"2023-10-11T20:11:42.000Z","dependencies_parsed_at":"2022-09-07T20:11:56.742Z","dependency_job_id":null,"html_url":"https://github.com/chrisrowe/tailwindcss-triangle-after","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrowe%2Ftailwindcss-triangle-after","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrowe%2Ftailwindcss-triangle-after/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrowe%2Ftailwindcss-triangle-after/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrowe%2Ftailwindcss-triangle-after/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisrowe","download_url":"https://codeload.github.com/chrisrowe/tailwindcss-triangle-after/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248100282,"owners_count":21047771,"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":["tailwindcss","tailwindcss-plugin"],"created_at":"2024-07-31T17:00:35.358Z","updated_at":"2025-04-09T19:40:54.747Z","avatar_url":"https://github.com/chrisrowe.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# Triangle After Tailwind Plugin\n\n## Installation\n\nAdd this plugin to your project:\n\n```bash\n# Install via npm\nnpm install --save-dev tailwindcss-triangle-after\n```\n\n## Usage\n\nThis plugin generates styles for CSS based triangles via `::after` pseudo-elements.\n\nThe plugin accepts multiple objects where each key defines a class suffix for a triangle name. Triangle options are...\n\n- `color`: _e.g. `colors['blue']`_\n- `direction`: _e.g. `up`, `down`, `left` or `right`_\n- `right`: (optional / default `1rem`) How far from the right of the parent should the pseudo-element be? _e.g. `2rem`._\n- `top`: (optional / default `50%`) How far from the top of the parent should the pseudo-element be?\n- `size`: (in pixels) _e.g. an array `[width, height]` or `9` for an equilateral triangle._\n\nHere is the example for adding it to your project plugins\n\n```js\nmodule.exports = {\n  // ...\n  plugins: [\n    // ...\n    require('./plugins/triangle-after')({\n      triangles: {\n        select: {\n          color: colors['blue'],\n          direction: 'down',\n          size: [10, 6],\n        },\n        next: {\n          color: colors['blue-darker'],\n          direction: 'right',\n          right: '2rem',\n          top: '3rem',\n          size: 12\n        }\n      },\n    }),\n  ],\n}\n```\n\nThis configuration would create the following classes ideal for using for customizing `\u003cselect\u003e` elements and adding arrows to pagination links:\n\n```css\n.triangle-after-select {\n  position: relative;\n}\n\n.triangle-after-select::after {\n  border-color: transparent;\n  border-style: solid;\n  content: \"\";\n  height: 0;\n  position: absolute;\n  pointer-events: none;\n  top: 50%;\n  transform: translateY(-50%);\n  width: 0;\n  right: 1rem;\n  border-top-color: #3490dc;\n  border-width: 6px 5px 0 5px;\n}\n\n.triangle-after-next {\n  position: relative;\n}\n\n.triangle-after-next::after {\n  border-color: transparent;\n  border-style: solid;\n  content: \"\";\n  height: 0;\n  position: absolute;\n  pointer-events: none;\n  top: 50%;\n  transform: translateY(-50%);\n  width: 0;\n  right: 2rem;\n  border-left-color: #1c3d5a;\n  border-width: 12px 0 12px 12px;\n}\n```\n\nAs per the [tailwind plugin docs](https://tailwindcss.com/docs/plugins/) you can pass variants (responsive, hover, etc.) as a parameter.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisrowe%2Ftailwindcss-triangle-after","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisrowe%2Ftailwindcss-triangle-after","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisrowe%2Ftailwindcss-triangle-after/lists"}