npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kwiz/fluentui

v1.0.203

Published

KWIZ common controls for FluentUI

Readme

About @kwiz/fluentui

@kwiz/fluentui is a set of enhanced controls built for and on top of @fluentui/react-components (https://storybooks.fluentui.dev/react)

It adds a few key components, some very powerful and some simple wrappers to make the library easier to render in rapid dev.

Key components

Containers

Section

Renders a simple div with ease.

Properties:

  1. main: make this grow to fill space in a stackable component
  2. css: pass a string array of a makeStyles/useStyles classes

Vertical

A simple vertical flex box stackable

Horizontal

A simple horizontal flex box stackable

Stack

A simple vertical/horizontal flex box stackable

Data viewers

Table

A powerful strongly typed table control with sort, filter, sticky headers and sticker left 1/2 columns.

Provide an item level menu, and easy selection controls.

ListEx

Display items using a list control

AccordionEX

Display data in a collapsible accordion

QRCodeEX

Render a QR code for a specific string value (usually, a URL)

KWIZOverflowV2

A much better, more stable implementation of the overflow concept in the original library.

Render items horizontally or vertically in an overflow hidden zone to automatically collapse overflow items in a menu.

Inputs

InputEx

enhanced input control

InputNumberEx

enhanced input number control with built in validations

TextAreaEx

enhanced text area input control

FileUpload

Render a file upload button with a drop file option

DatePickerEx

A date picker wrapped nicely

CodeEditor

An implementation wrapper of monaco-editor

FileTypeIcon

Render an icon for a file type

DropdownEX

Strongly typed dropdown control

Buttons

A collection of ButtonEX controls and CompoundButtonEX controls wrapping and enhancing the original button control.

ButtonEX, ButtonEXSecondary, ButtonEXMessageBarAction, ButtonEXPrimary, ButtonEXDanger, ButtonEXSuccess, ButtonEXPrimarySubtle, ButtonEXDangerSubtle

CompoundButtonEX, CompoundButtonEXSecondary, CompoundButtonEXPrimary, CompoundButtonEXDanger

DrawPad

A canvas control

Key hooks

useDraggable

create a drag / drop context on an element, provide the element ref via dragDropRef like this:

const dropContext = useDragDropContext<..., ...>({...});
...
<Vertical main ref={(v) => {
    dropContext.dragDropRef(v);
}}>

Next, you can show "drop here" UI using markers like this:

{dropContext.drop.isOver && <div>drop here!</div>}

a useDragDropContext must be added to all draggable items (or files), and to all droppable zones, explaining what they allow to drag / drop.

useTrackFocus

useWindowSize

useElementSize

useIsInPrint

useKeyDown

useStateEX

set state on steroids. provide promise callback after render, onChange transformer and automatic skip-set when value not change

useRefWithState

use a ref, that can be tracked as useEffect dependency

useClickableDiv

return props to make div appear as clickable, and accept enter key as click

useAlerts

Easily prompt, confirm or alert the user. To use this you must render the alertPrompt in your element.

useAutoFocusEX

better auto-focus that actually works. use the ref on the element you wish to focus.

focus set initially, and then again on a timeout - default is 200ms timeout. send 0 to skip the timeout

useControlledStateTracker

track an input control if it was changed from a managed to unmanaged (controlled / uncontrolled) state between renders.

for example, if you pass a value on first render, but a defaultValue on a following render.

useHighlight

returns a function you can call to make an element glow momentarily

useIsConcurrent

Call at the beginning of a useEffect, check after all your promises finished before applying results to state. You must keep the same name for each useEffect

const {getConcurrency} = useIsConcurrent();
useEffect(()=>{
     const c = getConcurrency('loading data');
     const result = await someSlowPromise();
     if( c.isCurrent() ) setData(result);
},[]);

useReloadTracker

A simple reload marker, can be used as a dependency, and called as a function

Powerful load/reload/progress management with multiple scopes

useShowOnHover

Easily show content only on hover

useToast

useTrackChanges

Provides useful helpers for tracking if control has changes, and handling the save changes with progress bar and on success/fail messages.

Usage details

Debugging

For local debugging, use yalc-link to register the project, and watch to build and push.

Caller projects should use yalc add @kwiz/fluentui to link up your local project.

This will make sure both projects use the same instance of react.

Using the project controls

To successfully use these controls you should create a context, and wrap it in a drag/drop provider.

We recommend using the provider control:

<KWIZFluentProvider ctx={{ buttonShape: "rounded" }}>
    <IdPrefixProvider value="my-project">
    <FluentProvider theme={webLightTheme}>
      {content}
    </FluentProvider>
    </IdPrefixProvider>
</KWIZFluentProvider>