@txstate-mws/txmantic-svelte
v2.0.1
Published
Svelte components that depend on our branded version of fomantic UI.
Readme
txmantic-svelte
Svelte components that depend on our branded version of fomantic UI. They're thin wrappers around @txstate-mws/svelte-components that add the fomantic class names, so the accessibility and keyboard behavior come from there and the look comes from txmantic.
<script lang="ts">
import { Select, Modal, PopupMenu, CollapsingTable, type SelectItem } from '@txstate-mws/txmantic-svelte'
</script>This library does not ship any fomantic CSS. You need to load the txmantic stylesheets yourself (at least core, dropdown, and modal), otherwise everything will render but look like unstyled HTML.
The components use Svelte 5 in legacy (non-runes) mode, so you still pass props, listen with on:change/on:dismiss, and fill slots with let: and slot="..." like you always have.
Development
npm run dev serves a demo page for each component out of src/routes. They use the public fomantic-ui-css package instead of our branded build, so the colors won't be quite right, but the layout is the same.
The tests are Playwright tests in tests/ that drive those demo pages, so if you add a feature, add a demo for it and then test the demo. Run them with ./test.sh (which also makes sure chromium is installed) or npm test.
Before publishing, npm run check and npm run lint should both be clean. npm publish runs svelte-package to build dist/.
