themesberg / themesberg/flowbite

Convenient methods

Open
#711 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
9.4k
Forks
862
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
The FlowbiteInstances.getInstance method is great, but is could be even better with convenient methods such as getModal, getCarousel, getTooltip, getDropdown and so on.

Describe the solution you'd like
Add convenient methods to have somthing like as follows:

const modal = FlowbiteInstances.getModal('modal-id');
// Same as const modal = FlowbiteInstances.getInstance('Modal', 'modal-id');

Describe alternatives you've considered
getInstance is fine too.

Additional context
no context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the FlowbiteInstances.getInstance definition and its existing usages in the repository. Review how component names and IDs are handled, then add the requested convenience accessors with equivalent behavior and verify that each accessor returns the same instance as getInstance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.