Giter Club home page Giter Club logo

flowbite-svelte's Introduction

FLOWBITE-SVELTE

npm version npm downloads npm downloads license Discord

⚠️ Flowbite Svelte is currently in early development and APIs and packages are likely to change quite often.

Flowbite Svelte UI components
Build websites even faster with Svelte components on top of Tailwind CSS

Flowbite Svelte is an official Flowbite UI component library for Svelte. All interactivities are handled by Svelte.

Visualize this repo's codebase

Flowbite Svelte Starters

You can find all the starters in the Starters directory.

Flowbite Svelte Examples

You can find all the examples in the Examples directory.

Installation

Documentation

For full documentation, visit flowbite-svelte.com.

Components

Alert Badge Breadcrumb
Svelte Alerts Svelte Badge Svelte Breadcrumbs
Button Button group Card
Svelte Buttons Svelte Button Group Svelte Cards
Dropdown Forms List group
Svelte Dropdown Svelte Forms Svelte List group
Typography Modal Tabs
Svelte Typography Svelte Modal Svelte Tabs
Navbar Pagination Timeline
Svelte Navbar Svelte Pagination Svelte Timeline
Progress bar Table Toast
Svelte Progress Bar Svelte Tables Svelte Toast
Tooltip Datepicker Spinner
Svelte Tooltips Svelte Datepicker Svelte Spinner
Footer Accordion Sidebar
Svelte Footer Svelte Accordion Svelte Sidebar
Carousel Avatar Rating
Svelte Carousel Svelte Avatar Svelte Rating
Input Field File Input Search Input
Svelte Input Field Svelte File Input Svelte Search Input
Select Textarea Checkbox
Svelte Select Svelte Textarea Svelte Checkbox
Radio Toggle Range Slider
Svelte Radio Svelte Toggle Svelte Range Slider
Floating Label Mega Menu Skeleton
Svelte Floating Label Svelte Mega Menu Svelte Skeleton
KBD (keyboard) Drawer (offcanvas) Popover
Svelte KBD (Keyboard) Svelte Drawer (offcanvas) Svelte Popover
Video Heading Paragraph
Svelte Video Svelte Heading Svelte Paragraph
Blockquote Image List
Svelte Blockquote Svelte Image Svelte List
Link Text Horizontal line (HR)
Svelte Link Svelte Text Svelte HR
Speed Dial Stepper(TBA) Indicators
Svelte Speed Dial Svelte Stepper Svelte Indicators
Bottom Navigation Sticky Banner Gallery (Masonry)
Svelte Bottom Navigation Bar Svelte Bottom Sticky Banner Svelte Image Gallery (Masonry)

Community

If you need help or just want to discuss about the library join the community on Github:

⌨️ Discuss about Flowbite on GitHub

For casual chatting with others using the library:

💬 Join the Flowbite Discord Server

Tests

Please use node v16.xx.x.

Run:

npm run test

Create props

npm run gen:props

This will pull all props from components and replace files in /src/routes/props directory.

Contribute

Please read how to contribute if you'd like to be part of the Flowbite community of contributors.

Changelog

View the full changelog on this page.

SvelteKit version

1.0.1

License

Flowbite Svelte is open-source under the MIT License.

flowbite-svelte's People

Contributors

524c avatar alessiogr avatar christophsturm avatar daschi1 avatar edde746 avatar ezegrosfeld avatar fkrauthan avatar frailbongat avatar gi4no avatar gushogg-blake avatar hetarth02 avatar jeremypeters avatar jjagielka avatar jumtp avatar mikerowe81 avatar minervabot avatar nobody0 avatar not-jayden avatar oliverwebr avatar orefalo avatar oune avatar ryanzhinie avatar seanwu1105 avatar shinokada avatar tabithalarkin avatar uherman avatar vasucp1207 avatar vonagam avatar xyassini avatar zoltanszogyenyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flowbite-svelte's Issues

Sidebar component

Add Sidbar component.

  • Default sidebar
  • Multi-level dropdown
  • Content separator
  • CTA button
  • Logo branding

Module layout

Currently all markdown files use src/layout/doc.svelte.
Each module has common related components section.
By creating a module layout you can avoid repeating that section.

Pagination component

Add Pagination component.

  • Default pagination
  • Pagination with icons
  • Previous and next
  • Previous and next with icons
  • Table data pagination
  • Table data pagination with icons

[Feature Request] Pass Svelte Component inside InterActiveTab component body

Thank you for sharing the library, just wanted to ask if it this could be added.

I had to base it on the included interactive tab, not really sure if someone else might need it, its not a very pretty implementation but it works.

<div id="{tabId}Content">
    {#each tabs as { label, content, id }}
        {#if activeTabValue === id}
            <div
                class="p-4 bg-gray-50 rounded-lg dark:bg-gray-800"
                id={label}
                role="tabpanel"
                aria-labelledby="{label}-tab"
            >
                {#if typeof content === 'string'}
                    <p class="text-sm text-gray-500 dark:text-gray-400">
                        {content}
                    </p>
                {:else}
                    <svelte:component this={content} />
                {/if}
            </div>
        {/if}
    {/each}
</div>

Missing Tooltips

One of the cool features of flowbite was the tooltips and would love to see it here.

  • Triggering
  • Styles
  • Placement
  • Animation
  • Disable arrow

Inconsistent modal id type

Hi,
I am a little bit confused about which type the modalIdStore is. It is initialized as a number (0) but the modal id is usually a string. I use typescript in my project and I receive a warning when setting the modalIdStore to a string.

See https://github.com/shinokada/flowbite-svelte/blob/af846d09b44bef789cdd2badc04a782c8c7d7408/src/lib/modals/modalStores.js#L3

I would suggest changing the default value of the store to ''

Furthermore, I am curious if you plan on adding more typescript support. There are a few further problems here and there. I am happy to help if that is something that you would like to add.

Additional components for Tab

Tab

  • Tabs with icons
  • Full width tabs
  • Structure change for Interactive tabs

For Interactive tab:

InteractiveHead, TabContent component for the content. TabContent will use slot. This allows to add any contents to TabContent component.

Logo class for Navbar Component

Having trouble sizing my logo (its a .png, its taking up the entire screen...) on the Navbar Component, missing property for image sizing.

Sidebar component's logo has its default class already set, any chance for customization (for both components' logo elements)?

Dropdown

Flowbite Dropdown
Flowbite-Svelte Dropdown

  • Default
  • Divider
  • Header
  • Dropdown navbar
  • Sizing
  • Icon/img + dropdown
  • Placement top
  • Placement right
  • Placement bottom
  • Placement left
  • Placement left start
  • Placement right start
  • Update Icon/img+dropdown by closing a dropdown by clicking the body and close another dropdown when you click another dropdown. The default dropdown has this functions already.
  • Mouseover action to open a dropdown.

Modal component contents don't scroll

If a modal's content is longer than the page, it gets clipped and there is no vertical scrollbar. Suggested solution: make the backdrop (the translucent div) the parent of the modal div and give it overflow-y: auto. Would also require stopPropagation for clicks on the modal as they would propagate to the parent and close the modal otherwise. If this solution sounds good I can make a PR. Thanks!

[Feature] Table component

Add Table component.

  • Default table
  • Highlight Striped rows
  • Highlight Striped columns
  • Checkbox
  • Hover state
  • Table layout, Table head (sortable)
  • Table layout, Table foot
  • Table layout, Table caption
  • Table styles, Without border
  • Table styles, Table with shadow
  • Overflow scrolling
  • Table search
  • Table filter
  • Table pagination
  • Checkbox selection
  • Table with users
  • Table with products
  • Table with modal
  • Comparison table
  • Table colors
  • Table colors, Striped rows color
  • Table colors, Striped columns color
  • Table colors, Hover state

This REPL may be helpful for the Search Input table.

Toast component

Add Toast component.

  • Default toast
  • Colors
  • Simple toast
  • Undo button
  • Toast message
  • Push notification
  • Interactive toast
  • Positioning

Timeline component

Add Timeline component.

  • Default timeline
  • Vertical timeline
  • Stepper timeline/Horizontal timeline
  • Activity log
  • Grouped timeline

Allow passing down custom classes and ids without using a property

So the problem I've come into is that I can't put custom ids or classes to these components, and when I wanted to use the type property for a button, i have to use the btnType property which is inconvenient.

Svelte actually supports passing down properties to its children. So for example, on the button component:

// Instead of using the type={btnType}
<button type={btnType} class={buttonClass} on:click>
	{name}
	<slot />
</button>

// We can use $$restProps
<button {...$$restProps} class={buttonClass} on:click>
	{name}
	<slot />
</button>

Here's the official documentation:
https://svelte.dev/docs#template-syntax-attributes-and-props

Plain svelte support (without sveltekit)

Failed to resolve import "$app/stores" from "node_modules/.pnpm/[email protected]/node_modules/flowbite-svelte/navbar/DropdownNavbar.svelte". Does the file exist?
Failed to resolve import "$app/stores" from "node_modules/.pnpm/[email protected]/node_modules/flowbite-svelte/navbar/Navbar.svelte". Does the file exist?

It seems like DropdownNavbar and Navbar hard depend on sveltekit, I assume this is for the routing functionality.
Could they be made router-agnostic?
If not I think this package should at least peer-depend on sveltekit (but I'd really like to be able to use it without sveltekit - in my template sveltesse-webext).

[Bug] `devDependencies` vs `dependencies`

Error

Took the latest package and noticed the following error that @codewithshin/svelte-heroicons package is missing

I believe some code dependencies needs to be marked as dependencies for flowbite-svelte without which they won't get installed for the downstream packages

2022-04-18_10-23-32

[Feature] Rating component

Add Rating component.

The Flowbite library doesn't have it, but it will be nice to have .5 stars as well.

  • Update the rating page to one page.
  • Default rating
  • Rating with text
  • Rating count
  • Star sizing
  • Advanced rating
  • Score rating
  • Rating comment
  • Review content

Focus input on load

If we need to implement a form input that focuses on page load, how do we do that?

Can we consider binding a ref as shown here for all the form inputs?

Website Sidebar menu update

When you click a sub page in the sidebar menu, it doesn't flicker. But when I click a category menu, it flickers. Because I needed to add rel="external" in order to close the sidebar menu.

It should close whenever I click a menu item or body area.

Build errors after updating to v 0.14.0

After updating (npm i -D flowbite-svelte@latest), I'm getting a [plugin:vite:css] Cannot find module 'flowbite/plugin' when I'm building my app, I've tried deleting both package-lock.json and node_modules then running npm install

Exports is not defined - fresh project with only button

exports is not defined
ReferenceError: exports is not defined
    at /node_modules/flowbite-svelte/dropdowns/dropdownStores.js:2:23
    at instantiateModule (D:\PROJEKTY\tron-shop-web\node_modules\vite\dist\node\chunks\dep-27bc1ab8.js:58525:15)

I don't event need to use exported button component in HTML code. It just needs an import

<script>
  import { Button } from 'flowbite-svelte';
</script>

<h1>Welcome to SvelteKit</h1>
<p>
  Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation
</p>

If I change <script> to <script lang="ts"> then I'm gettings this error

The requested module '/node_modules/flowbite-svelte/dropdowns/dropdownStores.js' does not provide an export named 'dropdownIdStore'
SyntaxError: The requested module '/node_modules/flowbite-svelte/dropdowns/dropdownStores.js' does not provide an export named 'dropdownIdStore'

All project setup with flowbite-svelte was based on Getting Started from website.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.