{"id":32168056,"url":"https://github.com/briankariuki/tremorx","last_synced_at":"2026-02-19T07:02:47.381Z","repository":{"id":211895493,"uuid":"730122523","full_name":"briankariuki/tremorx","owner":"briankariuki","description":"An Elixir Phoenix component library inspired by Tremor - The react library to build dashboards fast.","archived":false,"fork":false,"pushed_at":"2025-05-28T05:54:29.000Z","size":237,"stargazers_count":43,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-14T18:45:21.072Z","etag":null,"topics":["elixir","phoenix","phoenix-liveview","tailwindcss"],"latest_commit_sha":null,"homepage":"https://tremorx.fly.dev","language":"Elixir","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/briankariuki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":["briankariuki"]}},"created_at":"2023-12-11T08:57:25.000Z","updated_at":"2025-05-28T05:54:33.000Z","dependencies_parsed_at":"2024-08-22T12:15:51.738Z","dependency_job_id":"e4b44977-5f23-4d80-8725-5c98668b8d79","html_url":"https://github.com/briankariuki/tremorx","commit_stats":null,"previous_names":["briankariuki/tremorx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/briankariuki/tremorx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briankariuki%2Ftremorx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briankariuki%2Ftremorx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briankariuki%2Ftremorx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briankariuki%2Ftremorx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/briankariuki","download_url":"https://codeload.github.com/briankariuki/tremorx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briankariuki%2Ftremorx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29605803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["elixir","phoenix","phoenix-liveview","tailwindcss"],"created_at":"2025-10-21T15:43:52.100Z","updated_at":"2026-02-19T07:02:47.374Z","avatar_url":"https://github.com/briankariuki.png","language":"Elixir","funding_links":["https://github.com/sponsors/briankariuki"],"categories":[],"sub_categories":[],"readme":"# Tremorx\n\u003cp align=\"start\"\u003e\n  \u003ca href=\"https://hex.pm/packages/tremorx\"\u003e\n    \u003cimg alt=\"Hex Version\" src=\"https://img.shields.io/hexpm/v/tremorx.svg\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://hexdocs.pm/tremorx\"\u003e\n    \u003cimg alt=\"Hex Docs\" src=\"http://img.shields.io/badge/hex.pm-docs-green.svg?style=flat\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://opensource.org/license/mit\"\u003e\n    \u003cimg alt=\"MIT License\" src=\"https://img.shields.io/hexpm/l/tremorx\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://tremorx.fly.dev/getting_started\"\u003e\n    \u003cimg alt=\"Phoenix Storybook\" src=\"https://img.shields.io/badge/phoenix-storybook-purple\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nAn Elixir Phoenix component library inspired by [Tremor](https://www.tremor.so/) - The react library to build dashboards fast.\n\n\u003e [!WARNING]\n\u003e The current version is an alpha version. Please report any bugs you find!\n\n## Docs and Storybook\n\nPreview the components and examples storybook available at [https://tremorx.fly.dev](https://tremorx.fly.dev/getting_started)\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `tremorx` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:tremorx, \"~\u003e 0.1.1\"}\n    \n    # via git\n    {:tremorx, git: \"https://github.com/briankariuki/tremorx.git\"}\n  ]\nend\n```\nAdd tremorx to the dependecies section in `assets/package.json` like this:\n\nIf you don't have a `package.json` file, run `npm init -y`\n\n```\n{\n  \"dependencies\": {\n    #  Add this line\n    \"tremorx\": \"file:../deps/tremorx\"\n    \n    # If in umbrella project\n    \"tremorx\": \"file:../../../deps/tremorx\"\n  } \n}\n```\n\nThen run `npm install` in the assets folder.\n\nThen import the tremorx hooks in your `assets/js/app.js` file like this:\n```\n# Import the hooks\nimport { TremorHooks } from \"tremorx\";\n\n# Add the hooks to the LiveSocket hooks option\nlet liveSocket = new LiveSocket(\"/live\", Socket, {\n  hooks: {...MyHooks, ...TremorxHooks},\n});\n```\n\nUpdate your `*_web.ex` file like this:\n\n```\ndefp html_helpers do\n  quote do\n    \n    # Add this line\n    use Tremorx\n\n    # Routes generation with the ~p sigil\n    unquote(verified_routes())\n  end\nend\n```\n\nConfigure your `tailwind.config.js` file with the follwing:\n\nAllow tailwind to find css classes defined in this library by adding the following lines to the `content` section in `tailwind.config.js`\n```\ncontent: [\n  # Add these two lines.\n  \"../deps/tremorx/lib/components/**/*.ex\",\n  \"../deps/tremorx/lib/js/*.js\",\n\n  # If in umbrella.\n  \"../../deps/tremorx/lib/components/**/*.ex\",\n  \"../../deps/tremorx/lib/js/*.js\",\n]\n```\n\nConfigure the tremorx theme tokens by adding these theme extensions in `theme` section in `tailwind.config.js`. You can read more about theming [Here](https://www.tremor.so/docs/getting-started/theming)\n\n```\ntheme: {\n  # Extend your theme with tremor's default config\n  extend: {\n    colors: {\n      tremor: {\n        brand: {\n          faint: \"#eff6ff\",\n          muted: \"#bfdbfe\",\n          subtle: \"#60a5fa\",\n          DEFAULT: \"#3b82f6\",\n          emphasis: \"#1d4ed8\",\n          inverted: \"#ffffff\",\n        },\n        background: {\n          muted: \"#f9fafb\",\n          subtle: \"#f3f4f6\",\n          DEFAULT: \"#ffffff\",\n          emphasis: \"#374151\",\n        },\n        border: {\n          DEFAULT: \"#e5e7eb\",\n        },\n        ring: {\n          DEFAULT: \"#e5e7eb\",\n        },\n        content: {\n          subtle: \"#9ca3af\",\n          DEFAULT: \"#6b7280\",\n          emphasis: \"#374151\",\n          strong: \"#111827\",\n          inverted: \"#ffffff\",\n        },\n      },\n\n      \"dark-tremor\": {\n        brand: {\n          faint: \"#0B1229\",\n          muted: \"#172554\",\n          subtle: \"#1e40af\",\n          DEFAULT: \"#3b82f6\",\n          emphasis: \"#60a5fa\",\n          inverted: \"#030712\",\n        },\n        background: {\n          muted: \"#131A2B\",\n          subtle: \"#1f2937\",\n          DEFAULT: \"#111827\",\n          emphasis: \"#d1d5db\",\n        },\n        border: {\n          DEFAULT: \"#374151\",\n        },\n        ring: {\n          DEFAULT: \"#1f2937\",\n        },\n        content: {\n          subtle: \"#4b5563\",\n          DEFAULT: \"#6b7280\",\n          emphasis: \"#e5e7eb\",\n          strong: \"#f9fafb\",\n          inverted: \"#000000\",\n        },\n      },\n    },\n    boxShadow: {\n      # light\n      \"tremor-input\": \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n      \"tremor-card\":\n        \"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)\",\n      \"tremor-dropdown\":\n        \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n      # dark\n      \"dark-tremor-input\": \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n      \"dark-tremor-card\":\n        \"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)\",\n      \"dark-tremor-dropdown\":\n        \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n    },\n    borderRadius: {\n      \"tremor-small\": \"0.375rem\",\n      \"tremor-default\": \"0.5rem\",\n      \"tremor-full\": \"9999px\",\n    },\n    fontSize: {\n      \"tremor-label\": [\"0.75rem\"],\n      \"tremor-default\": [\"0.875rem\", { lineHeight: \"1.25rem\" }],\n      \"tremor-title\": [\"1.125rem\", { lineHeight: \"1.75rem\" }],\n      \"tremor-metric\": [\"1.875rem\", { lineHeight: \"2.25rem\" }],\n    },\n  },\n}\n\n```\n\nAlso safelist some css classes to prevent tailwind from purging them. To do this add the following to the `safelist` section in `tailwind.config.js`\n\n```\nsafelist: [\n  {\n    pattern:\n      /^(bg-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,\n    variants: [\"hover\", \"ui-selected\"],\n  },\n  {\n    pattern:\n      /^(text-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,\n    variants: [\"hover\", \"ui-selected\"],\n  },\n  {\n    pattern:\n      /^(border-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,\n    variants: [\"hover\", \"ui-selected\"],\n  },\n  {\n    pattern:\n      /^(ring-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,\n  },\n  {\n    pattern:\n      /^(stroke-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,\n  },\n  {\n    pattern:\n      /^(fill-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,\n  },\n  { pattern: /^\\-?m(\\w?)-/ },\n  { pattern: /^p(\\w?)-/ },\n  { pattern: /^text-/ },\n  { pattern: /^bg-/ },\n  { pattern: /^w-/ },\n  { pattern: /^h-/ },\n  { pattern: /^h(\\w?)-/ },\n  { pattern: /^grid-/ },\n  { pattern: /^col-/ },\n  { pattern: /^border-/ },\n  { pattern: /^gap-/ },\n  { pattern: /^min-/ },\n],\n\n```\n\n## Usage\nIn your template import the component you need. For example,\n\n```\nalias Tremorx.Components.Input\nalias Tremorx.Components.Layout\nalias Tremorx.Components.Text\n```\n\nThen use like the following\n\n```\n\u003cLayout.col class=\"space-y-1.5\"\u003e\n  \u003clabel for=\"name\"\u003e\n    \u003cText.text class=\"text-tremor-content\"\u003e\n      Name\n    \u003c/Text.text\u003e\n  \u003c/label\u003e\n\n  \u003cInput.text_input\n    id=\"name\"\n    name=\"user[name]\"\n    placeholder=\"juma tano\"\n    type=\"text\"\n    field={f[:name]}\n    value={f[:name].value}\n    error={false}\n    error_message={nil}\n  /\u003e\n\u003c/Layout.col\u003e\n\n```\n\n## Components\n\n#### UI Components\n  - [ ] Accordion\n  - [x] Badges\n  - [x] Button\n  - [x] Callout\n  - [x] Card\n  - [ ] Date range picker\n  - [ ] Dialog\n  - [x] Divider\n  - [x] Icons\n  - [x] Legend\n  - [x] List\n  - [ ] Number Input\n  - [x] Select\n  - [ ] Switch\n  - [x] Table\n  - [x] Tabs\n  - [x] Text Input\n  - [x] Textarea\n\n#### Visualization Components\n  - [x] Area Chart\n  - [x] Bar Chart\n  - [x] Donut Chart\n  - [x] Line Chart\n  - [ ] Scatter Chart\n  - [ ] Funnel Chart\n  - [ ] Bar List\n  - [x] Progress Bar\n  - [ ] Marker Bar\n  - [ ] Delta Bar\n  - [ ] Category Bar\n  - [ ] Progress Circle\n  - [ ] Spark Charts\n  - [ ] Tracker\n\n#### Extra Components\n  - [x] Dropdown\n  - [x] Tooltip\n  - [ ] GeoJSON Map\n  \n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at \u003chttps://hexdocs.pm/tremorx\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriankariuki%2Ftremorx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbriankariuki%2Ftremorx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriankariuki%2Ftremorx/lists"}