Skip to main content

Introducing Extra Components: Advanced UI & Form Controls

· 3 min read
Alex Smith
Software Engineer

We're excited to announce a major addition to bestax-bulma: Extra Components. This release adds 15 new components that extend the core library with advanced UI controls and form inputs.

What's New

UI Components (8)

ComponentDescription
LoadingFull-page or container loading overlay with spinner
CollapseExpandable/collapsible content panels with animation
TooltipHover tooltips for displaying helpful information
StepsMulti-step progress indicator for wizard flows
SidebarSlide-out navigation panel from left or right
ToastBrief notification messages with auto-dismiss and action buttons
DialogConfirmation and alert dialogs
CarouselImage/content slider with navigation

Form Components (6)

ComponentDescription
SwitchToggle switch for on/off states
SliderRange slider for value selection
NumberinputNumber input with +/- buttons
RateStar/icon-based rating component
AutocompleteInput with dropdown suggestions
TaginputTag/chip input for multiple values

Quick Start

Installation

Extra components are included in the main package:

npm install @allxsmith/bestax-bulma

CSS Setup

Import the extras CSS after Bulma:

import 'bulma/css/bulma.min.css';
import '@allxsmith/bestax-bulma/dist/extras.css';

Basic Usage

import { Switch, Slider, Toast, Steps } from '@allxsmith/bestax-bulma';

Feature Highlights

Programmatic Notifications

Toast and Dialog provide programmatic APIs for triggering notifications from anywhere:

import { toast, dialog } from '@allxsmith/bestax-bulma';

// Success toast
toast.success('Changes saved!');

// Toast with undo action
toast.show({
message: 'Item deleted',
actionText: 'Undo',
actionType: 'info',
onAction: () => restoreItem(),
});

// Confirmation dialog
const confirmed = await dialog.confirm({
title: 'Delete?',
message: 'This cannot be undone.',
type: 'danger',
});

Controlled & Uncontrolled Modes

All form components support both patterns:

// Controlled
const [value, setValue] = useState(50);
<Slider value={value} onChange={setValue} />

// Uncontrolled
<Slider defaultValue={50} />

Full Accessibility

Every component includes:

  • Proper ARIA attributes
  • Keyboard navigation
  • Screen reader support
  • Focus management

Bulma Helper Props

All components support Bulma's helper props system:

<Switch color="success" isRounded>
Dark Mode
</Switch>

<Steps color="primary" size="medium">
...
</Steps>

Interactive Examples

Switch

function SwitchDemo() {
  const [enabled, setEnabled] = React.useState(false);
  return (
    <Switch
      checked={enabled}
      onChange={e => setEnabled(e.target.checked)}
      color="success"
      isRounded
    >
      Notifications: {enabled ? 'On' : 'Off'}
    </Switch>
  );
}

Slider

function SliderDemo() {
  const [volume, setVolume] = React.useState(50);
  return (
    <div>
      <Slider
        value={volume}
        onChange={setVolume}
        showOutput
        color="primary"
        isRounded
      />
    </div>
  );
}

Steps

function StepsDemo() {
  const [step, setStep] = React.useState(1);
  return (
    <Steps
      value={step}
      items={[
        { label: 'Cart', clickable: true },
        { label: 'Shipping', clickable: true },
        { label: 'Payment', clickable: true },
        { label: 'Complete', clickable: true },
      ]}
      onStepClick={setStep}
      color="success"
    />
  );
}

Documentation

For complete documentation and more examples:

What's Next

We're continuing to expand bestax-bulma with more components and features. Coming soon:

  • DateInput - Calendar date selection
  • TimeInput - Time selection dropdown
  • Colorpicker - Color selection with presets

Stay tuned for more updates!