Easy.Blazor.Bulma 1.1.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Easy.Blazor.Bulma --version 1.1.3                
NuGet\Install-Package Easy.Blazor.Bulma -Version 1.1.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Easy.Blazor.Bulma" Version="1.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Easy.Blazor.Bulma --version 1.1.3                
#r "nuget: Easy.Blazor.Bulma, 1.1.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Easy.Blazor.Bulma as a Cake Addin
#addin nuget:?package=Easy.Blazor.Bulma&version=1.1.3

// Install Easy.Blazor.Bulma as a Cake Tool
#tool nuget:?package=Easy.Blazor.Bulma&version=1.1.3                

Easy Blazor Bulma

MIT NuGet

Getting Started

This library provides an easy to use, out of the box implementation of the Bulma CSS framework for use with Blazor. It uses the latest version of Bulma, so you do not need to worry about updating it yourself. There are also several extensions to Bulma that are included and integrated here. Additionally, the Google Material Symbols font is packaged here also. All of this is takes just a single line in your index.html or single using statement in your CS files to start using.

After install, you can use all of the Bulma styles, along with those of the extension packages on your own components. You may want to store a copy of the pre-compiled CSS files somewhere in your solution so that Visual Studio can use Intellisense to give you CSS class recommendations. You will also be able to use the .material-icons CSS class to use any of the Material Symbols. The icon font will also be updated regularly, just let me know if there are any missing and I can do an update.

Finally, you can use any of the pre-built components here to simplify use of the Bulma framework. Items such as <Tabs />, <Panel />, or <ProgressBar /> will all be available. There is a list below, eventually all items in the Bulma documentation will be added. If you need one of the missing ones either do a Pull Request or let me know and I may have time.

Installation

To use this library either clone a copy of the repository or check out the NuGet package

Features

  • Pre-compiled CSS bundle containing Bulma, several extensions, and a dark theme
  • Interactive Blazor components for Bulma framework elements
  • Additional components to help with common Blazor tasks
  • Bundled with Google Material Symbols icon font
  • No additional dependencies (Microsoft.AspNetCore.Components.Web is already required by Blazor)
  • No JavaScript required (except for <ThemeSelector />)

Component List

The following components are currently available for use. All of them are documented and you can hover over them in Visual Studio to get details for the components and their parameters.

Components

  • <BreadCrumb /> and <BreadCrumbItem />, creates a simple breadcrumb component to improve your navigation experience
  • <Card />, creates an all-around flexible and composable component
  • <Message />, creates a styled block containing a note to display
  • <Modal />, creates an overlay that can display additional content
  • <Navbar />, creates a navigation menu to use at the top of the screen
  • <NavbarDropdown />, creates a dropdown to use in a Navbar menu
  • <NavbarItem />, creates a link to use in a Navbar menu
  • <Panel />, creates a styled block containing content to display
  • <Steps /> and <Step />, creates a progress tracker with visual indicators
  • <Tabs /> and <Tab />, creates a tab bar and content panels

Elements

  • <BooleanIcon />, creates an icon with either a check or 'X'
  • <ButtonBase />, allows easily creating standard buttons
  • <DeleteButton />, creates a button to delete a record with a confirmation modal
  • <Notification />, creates a bold notification block, to alert your users of something
  • <ProgressBar />, creates a meter to display completion or loading status
  • <ResetButton />, creates a button to reset contents of a form
  • <SubmitButton />, creates a button to submit contents of a form
  • <Table />, creates an HTML table
  • <TableCellBase />, allows easily creating table cells
  • <TableData />, creates a td element within a table
  • <TableHeader />, creates a th element within a table
  • <TableRow />, creates a tr element within a table

Errors

  • <_400 />, displays a message with 400: Bad Request
  • <_401 />, displays a message with 401: Unauthorized
  • <_403 />, displays a message with 403: Forbidden
  • <_404 />, displays a message with 404: Not Found
  • <_405 />, displays a message with 405: Method Not Allowed
  • <_408 />, displays a message with 408: Request Timeout
  • <_409 />, displays a message with 409: Conflict
  • <_422 />, displays a message with 422: Unprocessable Entity
  • <_423 />, displays a message with 423: Locked
  • <_426 />, displays a message with 426: Upgrade Required
  • <_500 />, displays a message with 500: Internal Server Error
  • <_501 />, displays a message with 501: Not Implemented
  • <_502 />, displays a message with 502: Bad Gateway
  • <_503 />, displays a message with 503: Service Unavailable
  • <_504 />, displays a message with 504: Gateway Timeout
  • <ExtendedErrorBoundary />, provides additional details on exceptions
  • <Unknown />, displays a message with generic error details

Form

  • <InputAutocomplete />, creates a drop-down list of options to select from
  • <InputCharacter />, creates a series of buttons to select a single character
  • <InputDateTime />, creates an input with a popout for binding date and time values
  • <InputDuration />, creates an input with a popout for binding duration values
  • <InputFlaggedEnum />, creates a series of checkboxes for bitmasked enum types
  • <InputPassword />, creates an input for entering passwords
  • <InputNumberPad />, creates a keyboard style number pad for numeric values
  • <InputRadioGroupObject />, creates a radio group with the provided option list
  • <InputSelectEnum />, creates a select list for enum types
  • <InputSelectObject />, creates a select list for object types
  • <InputSwitch \>, creates a sliding on off switch with an underlying checkbox
  • <Label />, creates a label to display with form inputs

Helpers

  • <Loader />, displays a loading screen with a progress meter and message
  • <ThemeSelector />, toggles between dark and light CSS themes (requires JavaScript file and both CSS stylesheets in index.html)
  • <TitleBlock />, displays a banner accross the top of the screen with some text

Layout

  • <Hero />, creates an imposing hero banner to showcase something
  • <Level /> and <LevelItem />, displays a multi-purpose horizontal level
  • <MediaObject />, creates a media object prevalent in social media interfaces

Usage

Basic Example

The following example provides a complete use case. This example makes use of the most basic configuration.

In your index.html file add the following line. You must do this even if you just want to use the components, they need this too.

<link rel="stylesheet" href="_content/Easy.Blazor.Bulma/css/easy-blazor-bulma.min.css" />

This will link the CSS style pack and Google Material Symbols icon font.

Next, add one of the components or use some of the styles in your own components.

@using easy_blazor_bulma

<p class='block'>Here's a giant checkbox!</p>
<BooleanIcon class='is-size-1 is-jumbo' @bind-Value=Test />

@code {
	private bool Test { get; set; } = true;
}

Dark Theme Example

To use the dark theme, just add a secondary stylesheet reference in your index.html. The theme can automatically be selected based on the preference of the user. Changing between the styles can be done easily with an IJSRuntime.

<head>
    
    <link rel="stylesheet" href="_content/Easy.Blazor.Bulma/css/easy-blazor-bulma.min.css" id="easy-blazor-bulma" media="(prefers-color-scheme: light)" />
    <link rel="stylesheet" href="_content/Easy.Blazor.Bulma/css/easy-blazor-bulma-dark.min.css" id="easy-blazor-bulma-dark" media="(prefers-color-scheme: dark)" />
</head>

<body>
    
    <script src="_content/Easy.Blazor.Bulma/js/easy-blazor-bulma.js" type="text/javascript"></script>
</body>

There are 5 helper methods in the bundled JavaScript file.

  • easyBlazorBulma.IsOsDarkMode, checks to see if dark mode is currently enabled
  • easyBlazorBulma.ToggleStyleSheet, enables or disables the element with the matching id
  • easyBlazorBulma.HasStorage, tests to see if browser storage is available
  • easyBlazorBulma.WriteStorage, saves the provided value to browser storage
  • easyBlazorBulma.ReadStorage, retrieves the specified value from browser storage

Additionally, you can use the <ThemeSelector /> component to display a button that will toggle between themes. By default it applies the .navbar-item CSS class, if you provide another class this will override it. Simply including this component anywhere in your display will automatically load the correct theme when your app starts.

Icons

To use an icon just add a <span> with the desired icon text and the .material-icons CSS class. The sample below will produce the magnifier glass icon. An icon reference is available at Google Fonts.

<span class="material-icons">search</span>

Build Details

Frameworks

  • .NET 6.0
  • .NET 7.0
  • .NET 8.0

External Libraries

Name Usage License Library
Easy Core NuGet MIT GitHub
Bulma Submodule MIT GitHub
Bulma Calendar Submodule MIT GitHub
Bulma Checkradio Submodule MIT GitHub
Bulma-O-Steps Submodule GPL-3.0 GitHub
Bulma Switch Submodule MIT GitHub
Bulma Tooltip Submodule MIT GitHub
Bulma Jumbo Tiny Submodule MIT GitHub
Material Symbols Embedded Apache 2.0 GitHub

Authors

  • NF Software Inc.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

Thank you to:

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.13 148 10/18/2024
1.1.12 124 9/24/2024
1.1.11 128 9/11/2024
1.1.10 116 9/4/2024
1.1.9 151 8/21/2024
1.1.8 111 8/21/2024
1.1.7 126 8/13/2024
1.1.6 118 8/13/2024
1.1.5 117 8/8/2024
1.1.4 114 7/30/2024
1.1.3 99 7/18/2024
1.0.30 124 7/2/2024
1.0.29 105 6/28/2024
1.0.28 112 6/25/2024
1.0.27 96 6/7/2024
1.0.26 104 6/1/2024
1.0.25 99 5/30/2024
1.0.24 90 5/30/2024
1.0.23 95 5/28/2024
1.0.22 94 5/25/2024
1.0.21 85 5/25/2024
1.0.20 105 5/24/2024
1.0.19 153 4/29/2024
1.0.18 93 4/29/2024
1.0.17 126 4/11/2024
1.0.16 110 4/10/2024
1.0.15 127 4/1/2024
1.0.14 107 3/28/2024
1.0.13 99 3/28/2024
1.0.12 109 3/16/2024
1.0.11 105 3/14/2024
1.0.10 113 3/7/2024
1.0.9 105 3/6/2024

1.1.3
Bugfix

1.1.2
Refine components

1.1.1
Add new error component and Fix minor issues

1.1.0
Drop support for .NET 7.0, Add new SASS helpers, and Improve support for readonly

1.0.30
Bugfix

1.0.29
Improve element reference support

1.0.28
Improve readonly and Custom CSS support

1.0.27
Component refinement and Icon font update

1.0.26
Fix issue in Message component

1.0.25
Update InputAutocomplete to include tag for selection

1.0.24
Add AreEqual parameters to components with comparable bound values

1.0.23
Bugfix

1.0.22
Bugfixes

1.0.21
Add .is-resizable class for table headers

1.0.20
Add Card, BreadCrumb, and InputRadioGroupObject components

1.0.19
Bugfix

1.0.18
Add column sizing options for tables and Add InputPassword component

1.0.17
Add Table, TableRow, TableHeader, TableData, and MediaObject components

1.0.16
Add minified JS, Add Loader component, and Improve custom CSS support

1.0.15
Add new components and Add events to ExtendedErrorBoundary

1.0.14
Fix ExtendedErrorBoundary protection level

1.0.13
Update publishing parameters, Add button components, and Improve custom attribute support

1.0.12
Fix issues and Add Level

1.0.11
Add InputSwitch, Label, Navbar, NavbarDropdown, and NavbarItem components and Tooltips

1.0.10
Fix issues and Add ProgressBar, InputSelectObject

1.0.9
Update NuGet dependency to patch transitive security vulnerability

1.0.8
Add error handling components

1.0.7
Fix exception in InputFlaggedEnum for nullable values

1.0.6
Fix issues and Add InputSelectEnum, InputAutocomplete

1.0.5
Add InputCharacter and InputNumberPad

1.0.4
Add InputDuration and InputDateTime

1.0.3
Add more new components

1.0.2
Add new components

1.0.1
Fix content not exporting

1.0.0
Initial release