Svelte Material UI
repository·master·Indexed 25 days ago
https://github.com/hperrin/svelte-material-uiA collection of Svelte Material UI components including Accordion, Autocomplete, Badge, Banner, Bottom App Bar, Button, Card, Checkbox, Chip Input, and Chips. It provides tools to implement Material Design's shadow and depth system (z-space) through CSS classes, Sass mixins, and elevation overlay management.
What's inside svelte-material-ui
- The Chip Input component allows users to enter text that is converted into a set of chips. It also supports autocomplete functionality, enabling users to select choices from a list to be added as chips.
Use Svelte Material UI - Autocomplete
masterThe Autocomplete component provides users with suggestions while typing and functions as a combobox that accepts any user input. For interactive examples and usage patterns, visit the official demo page.
https://sveltematerialui.com/demo/autocompleteUse Svelte Material UI - Select
masterThe
@smui/selectcomponent provides select menus that allow users to choose between multiple items, following the Material Design specification for Dropdown menus. For interactive examples and usage information, visit the official demo site.https://sveltematerialui.com/demo/selectUse the Floating Label component
masterThe@smui/floating-labelpackage exports a default component used to create a floating label in an input field. This is typically used when manually constructing text fields rather than using a pre-built input component.Use Svelte Material UI - Image List
masterImage lists are RTL (Right-to-Left) aware containers designed to hold sets of images and optional content. For interactive examples and usage patterns, refer to the official Svelte Material UI demo site.
https://sveltematerialui.com/demo/image-listUse Svelte Material UI Banners
masterBanners are used to display important, succinct messages that require user action to be dismissed. They are persistent, non-modal components that should be displayed at the top of the viewport (typically below a top app bar). Note that only one banner should be shown to the user at any time.
You can view interactive examples and usage information at the official demo site: https://sveltematerialui.com/demo/banner
Use Svelte Material UI - Accordion
masterThe Accordion component provides a group of panels that expand to show their content. For interactive examples and usage demonstrations, visit the official Svelte Material UI demo site.
https://sveltematerialui.com/demo/accordionUse the Select Icon component
masterTheSelect Iconcomponent provides an icon that appears next to a select menu, following the Material Design specification for dropdown menus.Use the Segmented Button component
masterSegmented buttons group related options together and allow the user to toggle them. For interactive demos and usage examples, visit the official Svelte Material UI demo page.
https://sveltematerialui.com/demo/segmented-buttonUse the Icon Button component
masterTheIcon Buttoncomponent provides symbolic buttons or toggles. If thehrefproperty is provided, the component renders as an anchor element (A); otherwise, it renders as aButton.Install the @smui/slider package
masterTo use the Svelte Material UI Slider component in your project, install the
@smui/sliderpackage via npm.npm install --save-dev @smui/sliderMigrate from SMUI 6 to SMUI 7
masterSMUI 7 migrated to MDC 14.0 and requires Svelte 4 (Svelte 3 is no longer supported).
Breaking Changes
- Tooling: Build tools (Rollup/Webpack) must be Svelte-aware via conditional exports.
- Component Tags:
@smui/common/elementscomponents are removed. Use thetagprop on components instead (e.g.,<Button tag="div">). - SVG Components: If using
component={Svg}, change totag="svg". - Types:
*ComponentDevtypes are removed. Use the component itself as the type. Components withcomponentortagprops now use generic arguments for the tag type. - TextField: The
Inputcomponent from@smui/textfieldsetsvaluetoNumber.NaNwhen empty.
Component Changes
- Banner: Added
autoCloseprop andSMUIBanner:actionClickedevent. - Dialog: Added
sheetandnoContentPaddingprops. - FAB/Switch: Added
focusRingprop for High Contrast Mode support. - List: Added
disabledItemsFocusableandwrapper(on Item).