Skip to content

Commit

Permalink
feat: add README
Browse files Browse the repository at this point in the history
  • Loading branch information
xmimiex committed Jun 6, 2024
1 parent 2e1f9f0 commit f6090f3
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 906 deletions.
179 changes: 26 additions & 153 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,172 +1,45 @@
<div style="text-align: center">
<h1>flowbite-qwik</h1>
# Flowbite Qwik Icons

<div>
<a href="https://flowbite.com">
<img alt="Flowbite Qwik - Tailwind CSS components" width="500" src="./public/logo-light-bg.png">
</div>
<p>
Build websites even faster with components on top of Qwik and Tailwind CSS
</p>
<p>
<a href="https://www.npmjs.com/package/flowbite-qwik">
<img src="https://img.shields.io/npm/dt/flowbite-qwik.svg" alt="Total Downloads">
</a>
<a href="https://badge.fury.io/js/flowbite-qwik">
<img alt="Latest release" src="https://badge.fury.io/js/flowbite-qwik.svg">
</a>
<a href="https://flowbite.com/getting-started/license/">
<img src="https://img.shields.io/badge/license-MIT-blue" alt="License">
</a>
</p>
</div>
Include popular Flowbite icons easily in your Qwik projects with `flowbite-qwik-icons` 🚀

---
- [Flowbite Icons](https://flowbite.com/icons/)

### `flowbite-qwik` is an open source collection of UI components, built in Qwik, with utility classes from Tailwind CSS that you can use as a starting point for user interfaces and websites.
## Installation

## Table of Contents

- [Documentation](#documentation)
- [Getting started](#getting-started)
- [Require via `npm`](#require-via--npm-)
- [Components](#components)
- [Copyright and license](#copyright-and-license)

## Documentation

Documentation for `flowbite-qwik` is not yet finished.

[//]: # 'If you want to browse the components, visit [flowbite.com](https://flowbite.com/).'

If you want to learn more about Flowbite, visit [Flowbite docs](https://flowbite.com/docs/getting-started/introduction/).

## Getting started

To use `flowbite-qwik`, you just need to setup `flowbite` normally and install `flowbite-qwik` from `npm`.

`flowbite` can be included as a plugin into an existing Tailwind CSS project.

### Require via `npm`

Make sure that you have <a href="https://nodejs.org/en/" rel="nofollow" >Node.js</a> and <a href="https://tailwindcss.com/" rel="nofollow" >Tailwind CSS</a> installed.

1. Install `flowbite` as a dependency using `npm` by running the following command:
Simply install the package with your package manager of choice:

```bash
npm i flowbite flowbite-qwik
```

2. Require `flowbite` as a plugin inside the `tailwind.config.js` file:

```javascript
import flowbitePlugin from 'flowbite/plugin'

export default {
theme: {
extend: {
animation: {
'from-left': 'slideFromLeft 0.2s 1',
'from-right': 'slideFromRight 0.2s 1',
},
keyframes: {
slideFromLeft: {
'0%': { transform: 'translateX(-100%)' },
'100%': { transform: 'translateX(0)' },
},
slideFromRight: {
'0%': { transform: 'translateX(100%)' },
'100%': { transform: 'translateX(0)' },
},
},
},
},
content: ['node_modules/flowbite-qwik/**/*.{cjs,mjs}'],
plugins: [flowbitePlugin],
}
npm i @qwikerx/flowbite-qwik-icons
yarn add @qwikerx/flowbite-qwik-icons
pnpm add @qwikerx/flowbite-qwik-icons
```

### Setup `flowbite-qwik` providers

In your `src/root.tsx` file, import the `FlowbiteProvider` and wrap your app with it and define the theme and toast position.

Default values are `theme="blue"` and `toastPosition="top-right"`.
## Usage

If you want to use the dark mode, you will also need to add the `FlowbiteProviderHeader` component in the head of your app.
Icon size and color are inherited by default

```tsx
import { FlowbiteProvider } from 'flowbite-qwik'
import { IconVolumeUpSolid } from "@qwikerx/flowbite-qwik-icons"

export default component$(() => {
export const MyComponent = component$(() => {
return (
<QwikCityProvider>
<head>
<meta charSet="utf-8" />
<RouterHead />
// Add this line to detect user's system preference
<FlowbiteProviderHeader />
</head>
<body lang="fr">
// Add the FlowbiteProvider component to wrap your app
<FlowbiteProvider toastPosition="top-right" theme="blue">
<RouterOutlet />
</FlowbiteProvider>
</body>
</QwikCityProvider>
<div style={{ color: "red", fontSize: "40px" }}>
<IconVolumeUpSolid />
</div>
)
})
```

## Components

- Accordions
- Badges
- Breadcrumbs
- Buttons
- CodeBlock
- Drawer
- Dropdown
- Footer
- Inputs
- Jumbotron
- Modal
- Navbar
- Ratings
- Sidebar
- Spinner
- Tabs
- Toasts
- Toggle

## composables

- useToasts
- useDark
- useMediaQuery
- useOuterClick
Icon can be used as component props

[//]: # '## Community'
[//]: #
[//]: # 'If you need help or just want to discuss about the library join the community on Github:'
[//]: #
[//]: # '⌨️ [Discuss about Flowbite on GitHub](https://github.com/themesberg/flowbite/discussions)'
[//]: #
[//]: # 'For casual chatting with others using the library:'
[//]: #
[//]: # '💬 [Join the Flowbite Discord Server](https://discord.gg/4eeurUVvTy)'
[//]: #
[//]: # '## Contributing'
[//]: #
[//]: # 'Thank you for your interest in helping! Feel free to get started.'
[//]: #
[//]: # '## Figma'
[//]: #
[//]: # 'If you need the Figma files for the components you can check out our website for more information:'
[//]: #
[//]: # '🎨 [Get access to the Figma design files](https://flowbite.com/figma/)'

## Copyright and license

The Flowbite name and logos are trademarks of Crafty Dwarf Inc.
```tsx
import { IconVolumeUpSolid } from "@qwikerx/flowbite-qwik-icons"

📝 [Read about the licensing terms](https://flowbite.com/getting-started/license/)
export const MyComponent = component$(() => {
return (
<Button prefix={IconVolumeUpSolid}>
Next
</Button>
)
})
```
17 changes: 4 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flowbite-qwik-icons",
"version": "0.1.0",
"name": "@qwikerx/flowbite-qwik-icons",
"version": "0.1.1",
"description": "Unofficial library for the free and open-source collection of over 430+ SVG icons for Flowbite and Qwik",
"keywords": [
"icon-library",
Expand Down Expand Up @@ -63,30 +63,21 @@
"@types/node": "^20.14.1",
"@vitest/coverage-v8": "^1.6.0",
"autoprefixer": "^10.4.19",
"clsx": "^2.1.1",
"eslint": "^9.4.0",
"eslint-config-prettier": "^9.1.0",
"fast-glob": "^3.3.2",
"got": "^14.4.1",
"node-stream-zip": "^1.15.0",
"np": "^10.0.5",
"postcss": "^8.4.38",
"prettier": "^3.3.0",
"prettier-plugin-tailwindcss": "^0.6.1",
"svgo": "^3.3.2",
"tsc-alias": "^1.8.10",
"tsm": "^2.3.0",
"tsx": "^4.11.2",
"typescript": "^5.4.5",
"typescript-eslint": "^8.0.0-alpha.26",
"undici": "^6.18.2",
"typescript-eslint": "^8.0.0-alpha.28",
"vite": "^5.2.12",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.6.0"
},
"peerDependencies": {
"@builder.io/qwik": "1.5.5",
"@builder.io/qwik-city": "1.5.5",
"tailwindcss": "^3.4.3"
"@builder.io/qwik-city": "1.5.5"
}
}
Loading

0 comments on commit f6090f3

Please sign in to comment.