preact.mdx 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. title: Preact
  3. description: Tabler Icons library for Preact framework.
  4. summary: Tabler Icons for Preact provides an optimized collection of icons specifically designed for use with Preact. These lightweight and scalable icons are easy to integrate into Preact-based projects.
  5. ---
  6. ![](/docs/icons/package-preact.png)
  7. ## Installation
  8. <TabsPackage name="@tabler/icons-preact" />
  9. or just [download from Github](https://github.com/tabler/tabler-icons/releases).
  10. ## How to use
  11. It's build with ESmodules so it's completely tree-shakable. Each icon can be imported as a component.
  12. ```js
  13. import { IconArrowDown } from '@tabler/icons-preact';
  14. const App = () => {
  15. return <IconArrowDown />;
  16. };
  17. export default App;
  18. ```
  19. You can pass additional props to adjust the icon.
  20. ```js
  21. <IconArrowDown color="red" size={48} />
  22. ```
  23. ### Props
  24. | name | type | default |
  25. | ------------- | -------- | ------------ |
  26. | `size` | _Number_ | 24 |
  27. | `color` | _String_ | currentColor |
  28. | `stroke` | _Number_ | 2 |