Skip to main content
Home

@mizu/show@0.9.2
Built and signed on GitHub Actions

👁️‍🗨️ *show directive for mizu.js

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
76%
Published
3 months ago (0.9.2)

*show="expression"

Version Phase Default
71 — DISPLAY true

Conditionally display an element.

<div *show="true">
  <!--...-->
</div>

Notes

Note

When hidden, the element's CSS display property is set to none !important.

Note

When shown and if initially hidden by a CSS stylesheet ( display: none), the element's display property is reset to initial !important.

Note

Unlike *if and *else directives, the element remains in the DOM when hidden.

Note

You can take advantage of the default value being true to hide elements before mizu.js loads (e.g. <style>[\*show]{display:none}</style>).

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@mizu/show

Import symbol

import * as show from "@mizu/show";
or

Import directly with a jsr specifier

import * as show from "jsr:@mizu/show";

Add Package

pnpm i jsr:@mizu/show
or (using pnpm 10.8 or older)
pnpm dlx jsr add @mizu/show

Import symbol

import * as show from "@mizu/show";

Add Package

yarn add jsr:@mizu/show
or (using Yarn 4.8 or older)
yarn dlx jsr add @mizu/show

Import symbol

import * as show from "@mizu/show";

Add Package

vlt install jsr:@mizu/show

Import symbol

import * as show from "@mizu/show";

Add Package

npx jsr add @mizu/show

Import symbol

import * as show from "@mizu/show";

Add Package

bunx jsr add @mizu/show

Import symbol

import * as show from "@mizu/show";