bestax-mcp 1.18.83 → 1.18.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,8 @@
7
7
  "examples": [
8
8
  {
9
9
  "title": "Default Card (Header, Image, Content, Footer)",
10
- "code": "<Card\n header=\"Card Header\"\n image=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n imageAlt=\"Vibrant galaxy with purple and gold tones\"\n footer={[\n <Card.FooterItem key=\"save\">Save</Card.FooterItem>,\n <Card.FooterItem key=\"cancel\">Cancel</Card.FooterItem>,\n ]}\n>\n Card content goes here.\n</Card>"
10
+ "code": "<Card\n header=\"Card Header\"\n image=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n imageAlt=\"Vibrant galaxy with purple and gold tones\"\n footer={[\n <Card.FooterItem key=\"save\">Save</Card.FooterItem>,\n <Card.FooterItem key=\"cancel\">Cancel</Card.FooterItem>,\n ]}\n>\n Card content goes here.\n</Card>",
11
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
11
12
  },
12
13
  {
13
14
  "title": "With Header Only",
@@ -19,11 +20,13 @@
19
20
  },
20
21
  {
21
22
  "title": "With Image Only",
22
- "code": "<Card\n image=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n imageAlt=\"Vibrant galaxy with purple and gold tones\"\n/>"
23
+ "code": "<Card\n image=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n imageAlt=\"Vibrant galaxy with purple and gold tones\"\n/>",
24
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
23
25
  },
24
26
  {
25
27
  "title": "With Image and Content",
26
- "code": "<Card\n image=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n imageAlt=\"Vibrant galaxy with purple and gold tones\"\n>\n Quando in rerum natura cursu fit ut populus aliquis inter nationes terrae...\n</Card>"
28
+ "code": "<Card\n image=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n imageAlt=\"Vibrant galaxy with purple and gold tones\"\n>\n Quando in rerum natura cursu fit ut populus aliquis inter nationes terrae...\n</Card>",
29
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
27
30
  },
28
31
  {
29
32
  "title": "No Shadow",
@@ -39,11 +42,13 @@
39
42
  },
40
43
  {
41
44
  "title": "Interactive (Colors, Spacing, Alignment, Footer)",
42
- "code": "<Card\n header=\"Upgrade to Pro\"\n headerIcon={\n <button className=\"card-header-icon\">\n <Icon library=\"fa\" name=\"bolt\" textColor=\"warning\" ariaLabel=\"Pro\" />\n </button>\n }\n image=\"/img/carousel/carousel-banner-3-4by3.jpg\"\n imageAlt=\"Starry night sky over mountain silhouettes\"\n m=\"3\"\n textAlign=\"centered\"\n hasShadow\n footer={[\n <Button key=\"upgrade\" color=\"success\">\n Upgrade Now\n </Button>,\n <Button key=\"learn\" color=\"info\" isOutlined>\n Learn More\n </Button>,\n ]}\n>\n Unlock advanced analytics, priority support, and unlimited exports for your\n team.\n</Card>"
45
+ "code": "<Card\n header=\"Upgrade to Pro\"\n headerIcon={\n <button className=\"card-header-icon\">\n <Icon library=\"fa\" name=\"bolt\" textColor=\"warning\" ariaLabel=\"Pro\" />\n </button>\n }\n image=\"/img/carousel/carousel-banner-3-4by3.jpg\"\n imageAlt=\"Starry night sky over mountain silhouettes\"\n m=\"3\"\n textAlign=\"centered\"\n hasShadow\n footer={[\n <Button key=\"upgrade\" color=\"success\">\n Upgrade Now\n </Button>,\n <Button key=\"learn\" color=\"info\" isOutlined>\n Learn More\n </Button>,\n ]}\n>\n Unlock advanced analytics, priority support, and unlimited exports for your\n team.\n</Card>",
46
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
43
47
  },
44
48
  {
45
49
  "title": "Compound (dot-notation) usage › Complete Card with Compound Components",
46
- "code": "import { Icon, Image } from '@allxsmith/bestax-bulma';\n\n<Card>\n <Card.Header>\n <Card.Header.Title>Compound Component Card</Card.Header.Title>\n <Card.Header.Icon aria-label=\"more options\">\n <Icon name=\"angle-down\" variant=\"solid\" ariaLabel=\"expand\" />\n </Card.Header.Icon>\n </Card.Header>\n <Card.Image>\n <Image\n src=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n alt=\"Vibrant galaxy with purple and gold tones\"\n size=\"4by3\"\n />\n </Card.Image>\n <Card.Content>\n <Content>\n This card is built using compound components for maximum flexibility.\n </Content>\n </Card.Content>\n <Card.Footer>\n <Card.FooterItem>\n <Button color=\"primary\">Save</Button>\n </Card.FooterItem>\n <Card.FooterItem>\n <Button>Cancel</Button>\n </Card.FooterItem>\n </Card.Footer>\n</Card>;"
50
+ "code": "import { Icon, Image } from '@allxsmith/bestax-bulma';\n\n<Card>\n <Card.Header>\n <Card.Header.Title>Compound Component Card</Card.Header.Title>\n <Card.Header.Icon aria-label=\"more options\">\n <Icon name=\"angle-down\" variant=\"solid\" ariaLabel=\"expand\" />\n </Card.Header.Icon>\n </Card.Header>\n <Card.Image>\n <Image\n src=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n alt=\"Vibrant galaxy with purple and gold tones\"\n size=\"4by3\"\n />\n </Card.Image>\n <Card.Content>\n <Content>\n This card is built using compound components for maximum flexibility.\n </Content>\n </Card.Content>\n <Card.Footer>\n <Card.FooterItem>\n <Button color=\"primary\">Save</Button>\n </Card.FooterItem>\n <Card.FooterItem>\n <Button>Cancel</Button>\n </Card.FooterItem>\n </Card.Footer>\n</Card>;",
51
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
47
52
  },
48
53
  {
49
54
  "title": "Compound (dot-notation) usage › Minimal Compound Card",
@@ -7,23 +7,28 @@
7
7
  "examples": [
8
8
  {
9
9
  "title": "Default Figure",
10
- "code": "<Figure>\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n</Figure>"
10
+ "code": "<Figure>\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n</Figure>",
11
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
11
12
  },
12
13
  {
13
14
  "title": "Figure with Caption",
14
- "code": "<Figure>\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption>This is a caption for the image</Figure.Caption>\n</Figure>"
15
+ "code": "<Figure>\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption>This is a caption for the image</Figure.Caption>\n</Figure>",
16
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
15
17
  },
16
18
  {
17
19
  "title": "Styled Caption",
18
- "code": "<Figure>\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption textColor=\"grey\" textSize=\"7\" mt=\"2\">\n Grey caption with smaller text\n </Figure.Caption>\n</Figure>"
20
+ "code": "<Figure>\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption textColor=\"grey\" textSize=\"7\" mt=\"2\">\n Grey caption with smaller text\n </Figure.Caption>\n</Figure>",
21
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
19
22
  },
20
23
  {
21
24
  "title": "Figure with Background",
22
- "code": "<Figure bgColor=\"light\" textColor=\"dark\" p=\"4\">\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption mt=\"2\">Figure with background and padding</Figure.Caption>\n</Figure>"
25
+ "code": "<Figure bgColor=\"light\" textColor=\"dark\" p=\"4\">\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption mt=\"2\">Figure with background and padding</Figure.Caption>\n</Figure>",
26
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
23
27
  },
24
28
  {
25
29
  "title": "Centered Caption",
26
- "code": "<Figure textAlign=\"centered\">\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption textSize=\"7\" mt=\"2\">\n Centered caption\n </Figure.Caption>\n</Figure>"
30
+ "code": "<Figure textAlign=\"centered\">\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption textSize=\"7\" mt=\"2\">\n Centered caption\n </Figure.Caption>\n</Figure>",
31
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
27
32
  },
28
33
  {
29
34
  "title": "Code Figure",
@@ -31,7 +36,8 @@
31
36
  },
32
37
  {
33
38
  "title": "Compound (dot-notation) usage",
34
- "code": "<Figure>\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption>Caption via the Figure.Caption static</Figure.Caption>\n</Figure>"
39
+ "code": "<Figure>\n <Image src=\"/img/bestax-solar-system-3d.png\" alt=\"Placeholder\" />\n <Figure.Caption>Caption via the Figure.Caption static</Figure.Caption>\n</Figure>",
40
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
35
41
  }
36
42
  ],
37
43
  "accessibility": "- **Image Alt Text:** Always provide meaningful alt text for images within figures.\n- **Figure Semantics:** The `<figure>` element groups content that is referenced from the main flow but could be moved without affecting the document's meaning.\n- **Caption Association:** Screen readers associate `<figcaption>` content with the figure automatically.\n\n:::info\nThe `<figure>` element is ideal for images, illustrations, diagrams, code listings, or anything that is referenced as a unit from the main content.\n:::",
@@ -23,7 +23,8 @@
23
23
  },
24
24
  {
25
25
  "title": "Fullheight with Head, Body, and Foot",
26
- "code": "function example() {\n const [open, setOpen] = useState(false);\n return (\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Head>\n <Navbar>\n <Container>\n <Navbar.Brand>\n <Navbar.Item as=\"a\" href=\"#home\">\n <Image src=\"/img/bestax-type-white.svg\" alt=\"Bestax\" mx=\"2\" />\n </Navbar.Item>\n <Navbar.Burger\n active={open}\n aria-controls=\"navbarMenuHeroA\"\n onClick={() => setOpen(o => !o)}\n />\n </Navbar.Brand>\n <Navbar.Menu id=\"navbarMenuHeroA\" active={open}>\n <Navbar.End>\n <Navbar.Item as=\"a\" href=\"#getting-started\" active>\n Getting Started\n </Navbar.Item>\n <Navbar.Item as=\"a\" href=\"#apis\">\n APIs\n </Navbar.Item>\n <Navbar.Item as=\"a\" href=\"#blog\">\n Blog\n </Navbar.Item>\n <Navbar.Item as=\"span\">\n <Button\n color=\"primary\"\n isInverted\n as=\"a\"\n href=\"#github\"\n mx=\"2\"\n >\n <Icon library=\"fa\" name=\"github\" variant=\"brands\" />\n <Span>Github</Span>\n </Button>\n </Navbar.Item>\n </Navbar.End>\n </Navbar.Menu>\n </Container>\n </Navbar>\n </Hero.Head>\n\n <Hero.Body>\n <Container textAlign=\"centered\">\n <Title>Bestax</Title>\n <SubTitle>A Bulma Component Library</SubTitle>\n </Container>\n </Hero.Body>\n\n <Hero.Foot>\n <Tabs>\n <Container>\n <ul>\n <Tabs.Item>\n <a href=\"#elements\">Elements</a>\n </Tabs.Item>\n <Tabs.Item>\n <a href=\"#components\">Components</a>\n </Tabs.Item>\n <Tabs.Item>\n <a href=\"#columns\">Columns</a>\n </Tabs.Item>\n <Tabs.Item>\n <a href=\"#grid\">Grid</a>\n </Tabs.Item>\n <Tabs.Item>\n <a href=\"#layout\">Layout</a>\n </Tabs.Item>\n </ul>\n </Container>\n </Tabs>\n </Hero.Foot>\n </Hero>\n );\n}"
26
+ "code": "function example() {\n const [open, setOpen] = useState(false);\n return (\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Head>\n <Navbar>\n <Container>\n <Navbar.Brand>\n <Navbar.Item as=\"a\" href=\"#home\">\n <Image src=\"/img/bestax-type-white.svg\" alt=\"Bestax\" mx=\"2\" />\n </Navbar.Item>\n <Navbar.Burger\n active={open}\n aria-controls=\"navbarMenuHeroA\"\n onClick={() => setOpen(o => !o)}\n />\n </Navbar.Brand>\n <Navbar.Menu id=\"navbarMenuHeroA\" active={open}>\n <Navbar.End>\n <Navbar.Item as=\"a\" href=\"#getting-started\" active>\n Getting Started\n </Navbar.Item>\n <Navbar.Item as=\"a\" href=\"#apis\">\n APIs\n </Navbar.Item>\n <Navbar.Item as=\"a\" href=\"#blog\">\n Blog\n </Navbar.Item>\n <Navbar.Item as=\"span\">\n <Button\n color=\"primary\"\n isInverted\n as=\"a\"\n href=\"#github\"\n mx=\"2\"\n >\n <Icon library=\"fa\" name=\"github\" variant=\"brands\" />\n <Span>Github</Span>\n </Button>\n </Navbar.Item>\n </Navbar.End>\n </Navbar.Menu>\n </Container>\n </Navbar>\n </Hero.Head>\n\n <Hero.Body>\n <Container textAlign=\"centered\">\n <Title>Bestax</Title>\n <SubTitle>A Bulma Component Library</SubTitle>\n </Container>\n </Hero.Body>\n\n <Hero.Foot>\n <Tabs>\n <Container>\n <ul>\n <Tabs.Item>\n <a href=\"#elements\">Elements</a>\n </Tabs.Item>\n <Tabs.Item>\n <a href=\"#components\">Components</a>\n </Tabs.Item>\n <Tabs.Item>\n <a href=\"#columns\">Columns</a>\n </Tabs.Item>\n <Tabs.Item>\n <a href=\"#grid\">Grid</a>\n </Tabs.Item>\n <Tabs.Item>\n <a href=\"#layout\">Layout</a>\n </Tabs.Item>\n </ul>\n </Container>\n </Tabs>\n </Hero.Foot>\n </Hero>\n );\n}",
27
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
27
28
  },
28
29
  {
29
30
  "title": "Landmark Tags",
@@ -7,27 +7,33 @@
7
7
  "examples": [
8
8
  {
9
9
  "title": "Default Image",
10
- "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Sample image\"\n size=\"128x128\"\n/>"
10
+ "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Sample image\"\n size=\"128x128\"\n/>",
11
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
11
12
  },
12
13
  {
13
14
  "title": "Rounded Image",
14
- "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Rounded image\"\n size=\"128x128\"\n isRounded\n/>"
15
+ "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Rounded image\"\n size=\"128x128\"\n isRounded\n/>",
16
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
15
17
  },
16
18
  {
17
19
  "title": "Retina Image",
18
- "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Retina image\"\n size=\"128x128\"\n isRetina\n/>"
20
+ "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Retina image\"\n size=\"128x128\"\n isRetina\n/>",
21
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
19
22
  },
20
23
  {
21
24
  "title": "Aspect Ratio 16:9",
22
- "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"16:9 aspect ratio image\"\n size=\"16by9\"\n/>"
25
+ "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"16:9 aspect ratio image\"\n size=\"16by9\"\n/>",
26
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
23
27
  },
24
28
  {
25
29
  "title": "Aspect Ratio 4:3",
26
- "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"4:3 aspect ratio image\"\n size=\"4by3\"\n/>"
30
+ "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"4:3 aspect ratio image\"\n size=\"4by3\"\n/>",
31
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
27
32
  },
28
33
  {
29
34
  "title": "With Margin",
30
- "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Image with margin\"\n size=\"128x128\"\n m=\"4\"\n/>"
35
+ "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Image with margin\"\n size=\"128x128\"\n m=\"4\"\n/>",
36
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
31
37
  },
32
38
  {
33
39
  "title": "With Iframe",
@@ -39,7 +45,8 @@
39
45
  },
40
46
  {
41
47
  "title": "With Text Color and Background",
42
- "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Image with text and background color\"\n size=\"128x128\"\n textColor=\"primary\"\n bgColor=\"light\"\n/>"
48
+ "code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Image with text and background color\"\n size=\"128x128\"\n textColor=\"primary\"\n bgColor=\"light\"\n/>",
49
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
43
50
  }
44
51
  ],
45
52
  "accessibility": "- **Alt Text:** Always provide a descriptive `alt` attribute for images.\n- **Aspect Ratios:** Maintains the correct aspect ratio for images, iframes, or any child.\n- **Custom Content:** When embedding iframes or custom children, ensure accessibility via proper ARIA labeling or content.\n\n:::warning\nDo not use `Image` for decorative images without `alt=\"\"`, unless purely presentational.\n:::",
@@ -15,7 +15,8 @@
15
15
  },
16
16
  {
17
17
  "title": "Centered Level Menu",
18
- "code": "<Level>\n <Level.Item as=\"p\" hasTextCentered>\n <Link href=\"#getting-started\" textColor=\"info\">\n Getting Started\n </Link>\n </Level.Item>\n <Level.Item as=\"p\" hasTextCentered>\n <Link href=\"#apis\" textColor=\"info\">\n APIs\n </Link>\n </Level.Item>\n <Level.Item as=\"p\" hasTextCentered>\n <img src=\"/img/bestax-type.svg\" alt=\"Bestax\" style={{ height: 30 }} />\n </Level.Item>\n <Level.Item as=\"p\" hasTextCentered>\n <Link href=\"#versions\" textColor=\"info\">\n Versions\n </Link>\n </Level.Item>\n <Level.Item as=\"p\" hasTextCentered>\n <Link href=\"#faq\" textColor=\"info\">\n FAQ\n </Link>\n </Level.Item>\n</Level>"
18
+ "code": "<Level>\n <Level.Item as=\"p\" hasTextCentered>\n <Link href=\"#getting-started\" textColor=\"info\">\n Getting Started\n </Link>\n </Level.Item>\n <Level.Item as=\"p\" hasTextCentered>\n <Link href=\"#apis\" textColor=\"info\">\n APIs\n </Link>\n </Level.Item>\n <Level.Item as=\"p\" hasTextCentered>\n <img src=\"/img/bestax-type.svg\" alt=\"Bestax\" style={{ height: 30 }} />\n </Level.Item>\n <Level.Item as=\"p\" hasTextCentered>\n <Link href=\"#versions\" textColor=\"info\">\n Versions\n </Link>\n </Level.Item>\n <Level.Item as=\"p\" hasTextCentered>\n <Link href=\"#faq\" textColor=\"info\">\n FAQ\n </Link>\n </Level.Item>\n</Level>",
19
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
19
20
  },
20
21
  {
21
22
  "title": "Mobile Level",
@@ -7,19 +7,23 @@
7
7
  "examples": [
8
8
  {
9
9
  "title": "Basic Usage",
10
- "code": "function example() {\n const photos = [\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n caption: 'A galaxy in purple and gold',\n },\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ];\n\n return (\n <Lightbox items={photos}>\n <Columns isMobile>\n {photos.map((photo, i) => (\n <Column key={photo.src} size=\"one-third\">\n <Lightbox.Trigger index={i}>\n <Image as=\"div\" src={photo.src} alt={photo.alt} size=\"4by3\" />\n </Lightbox.Trigger>\n </Column>\n ))}\n </Columns>\n </Lightbox>\n );\n}"
10
+ "code": "function example() {\n const photos = [\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n caption: 'A galaxy in purple and gold',\n },\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ];\n\n return (\n <Lightbox items={photos}>\n <Columns isMobile>\n {photos.map((photo, i) => (\n <Column key={photo.src} size=\"one-third\">\n <Lightbox.Trigger index={i}>\n <Image as=\"div\" src={photo.src} alt={photo.alt} size=\"4by3\" />\n </Lightbox.Trigger>\n </Column>\n ))}\n </Columns>\n </Lightbox>\n );\n}",
11
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
11
12
  },
12
13
  {
13
14
  "title": "A Button That Opens the Album",
14
- "code": "function example() {\n const photos = [\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n ];\n\n return (\n <Lightbox items={photos}>\n <Lightbox.Trigger index={0}>\n <Image as=\"div\" src={photos[0].src} alt=\"\" size=\"16by9\" />\n <Span display=\"block\" mt=\"2\" textWeight=\"semibold\">\n View all {photos.length} photos\n </Span>\n </Lightbox.Trigger>\n </Lightbox>\n );\n}"
15
+ "code": "function example() {\n const photos = [\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n ];\n\n return (\n <Lightbox items={photos}>\n <Lightbox.Trigger index={0}>\n <Image as=\"div\" src={photos[0].src} alt=\"\" size=\"16by9\" />\n <Span display=\"block\" mt=\"2\" textWeight=\"semibold\">\n View all {photos.length} photos\n </Span>\n </Lightbox.Trigger>\n </Lightbox>\n );\n}",
16
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
15
17
  },
16
18
  {
17
19
  "title": "A Button That Opens the Album",
18
- "code": "<Lightbox\n items={[\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n ]}\n>\n <Lightbox.Trigger as={Button} color=\"link\" index={0}>\n Open the photo\n </Lightbox.Trigger>\n</Lightbox>"
20
+ "code": "<Lightbox\n items={[\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n ]}\n>\n <Lightbox.Trigger as={Button} color=\"link\" index={0}>\n Open the photo\n </Lightbox.Trigger>\n</Lightbox>",
21
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
19
22
  },
20
23
  {
21
24
  "title": "Captions and Sizes",
22
- "code": "function example() {\n const photos = [\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n caption: (\n <>\n <strong>The Milky Way</strong>, over a line of peaks\n </>\n ),\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n caption: 'Stars over the mountains',\n },\n ];\n\n return (\n <Lightbox items={photos}>\n <Buttons>\n {photos.map((photo, i) => (\n <Lightbox.Trigger key={photo.src} as={Button} index={i}>\n Photo {i + 1}\n </Lightbox.Trigger>\n ))}\n </Buttons>\n </Lightbox>\n );\n}"
25
+ "code": "function example() {\n const photos = [\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n caption: (\n <>\n <strong>The Milky Way</strong>, over a line of peaks\n </>\n ),\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n caption: 'Stars over the mountains',\n },\n ];\n\n return (\n <Lightbox items={photos}>\n <Buttons>\n {photos.map((photo, i) => (\n <Lightbox.Trigger key={photo.src} as={Button} index={i}>\n Photo {i + 1}\n </Lightbox.Trigger>\n ))}\n </Buttons>\n </Lightbox>\n );\n}",
26
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
23
27
  },
24
28
  {
25
29
  "title": "Captions and Sizes",
@@ -27,19 +31,23 @@
27
31
  },
28
32
  {
29
33
  "title": "Keeping the Image in the URL",
30
- "code": "function example() {\n const [photo, setPhoto] = useState<number>();\n const photos = [\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ];\n\n return (\n <>\n <Paragraph mb=\"3\">\n {photo === undefined ? 'No photo open.' : `?photo=${photo + 1}`}\n </Paragraph>\n <Button onClick={() => setPhoto(2)}>Open the third photo</Button>\n <Lightbox\n items={photos}\n open={photo !== undefined}\n onOpenChange={open => !open && setPhoto(undefined)}\n value={photo ?? 0}\n onChange={setPhoto}\n />\n </>\n );\n}"
34
+ "code": "function example() {\n const [photo, setPhoto] = useState<number>();\n const photos = [\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ];\n\n return (\n <>\n <Paragraph mb=\"3\">\n {photo === undefined ? 'No photo open.' : `?photo=${photo + 1}`}\n </Paragraph>\n <Button onClick={() => setPhoto(2)}>Open the third photo</Button>\n <Lightbox\n items={photos}\n open={photo !== undefined}\n onOpenChange={open => !open && setPhoto(undefined)}\n value={photo ?? 0}\n onChange={setPhoto}\n />\n </>\n );\n}",
35
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
31
36
  },
32
37
  {
33
38
  "title": "Zoom",
34
- "code": "<Lightbox\n maxZoom={6}\n items={[\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n caption: 'Zoom in on the stars',\n },\n ]}\n>\n <Lightbox.Trigger as={Button} index={0}>\n Open the tall photo\n </Lightbox.Trigger>\n</Lightbox>"
39
+ "code": "<Lightbox\n maxZoom={6}\n items={[\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n caption: 'Zoom in on the stars',\n },\n ]}\n>\n <Lightbox.Trigger as={Button} index={0}>\n Open the tall photo\n </Lightbox.Trigger>\n</Lightbox>",
40
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
35
41
  },
36
42
  {
37
43
  "title": "Other Languages and Right to Left",
38
- "code": "function example() {\n const arabic = new Intl.NumberFormat('ar-EG');\n const photos = [\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'درب التبانة فوق ظلال الجبال',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'سماء ليلية مرصعة بالنجوم فوق قمم الجبال',\n },\n ];\n\n return (\n <LocaleProvider dir=\"rtl\" locale=\"ar-EG\">\n <Lightbox\n items={photos}\n ariaLabel=\"عارض الصور\"\n labels={{\n close: 'إغلاق',\n previous: 'الصورة السابقة',\n next: 'الصورة التالية',\n zoomIn: 'تكبير',\n zoomOut: 'تصغير',\n resetZoom: 'إعادة الحجم',\n loading: 'جارٍ تحميل الصورة',\n loadError: 'تعذّر تحميل هذه الصورة.',\n retry: 'إعادة المحاولة',\n progress: (current, total) =>\n `الصورة ${arabic.format(current)} من ${arabic.format(total)}`,\n }}\n >\n <Lightbox.Trigger as={Button} index={0}>\n عرض الصور\n </Lightbox.Trigger>\n </Lightbox>\n </LocaleProvider>\n );\n}"
44
+ "code": "function example() {\n const arabic = new Intl.NumberFormat('ar-EG');\n const photos = [\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'درب التبانة فوق ظلال الجبال',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'سماء ليلية مرصعة بالنجوم فوق قمم الجبال',\n },\n ];\n\n return (\n <LocaleProvider dir=\"rtl\" locale=\"ar-EG\">\n <Lightbox\n items={photos}\n ariaLabel=\"عارض الصور\"\n labels={{\n close: 'إغلاق',\n previous: 'الصورة السابقة',\n next: 'الصورة التالية',\n zoomIn: 'تكبير',\n zoomOut: 'تصغير',\n resetZoom: 'إعادة الحجم',\n loading: 'جارٍ تحميل الصورة',\n loadError: 'تعذّر تحميل هذه الصورة.',\n retry: 'إعادة المحاولة',\n progress: (current, total) =>\n `الصورة ${arabic.format(current)} من ${arabic.format(total)}`,\n }}\n >\n <Lightbox.Trigger as={Button} index={0}>\n عرض الصور\n </Lightbox.Trigger>\n </Lightbox>\n </LocaleProvider>\n );\n}",
45
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
39
46
  },
40
47
  {
41
48
  "title": "Compound (dot-notation) usage",
42
- "code": "<Lightbox\n items={[\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ]}\n>\n <Buttons>\n <LightboxTrigger as={Button} index={0}>\n LightboxTrigger\n </LightboxTrigger>\n <Lightbox.Trigger as={Button} index={1}>\n Lightbox.Trigger\n </Lightbox.Trigger>\n </Buttons>\n</Lightbox>"
49
+ "code": "<Lightbox\n items={[\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ]}\n>\n <Buttons>\n <LightboxTrigger as={Button} index={0}>\n LightboxTrigger\n </LightboxTrigger>\n <Lightbox.Trigger as={Button} index={1}>\n Lightbox.Trigger\n </Lightbox.Trigger>\n </Buttons>\n</Lightbox>",
50
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
43
51
  }
44
52
  ],
45
53
  "accessibility": "- **A modal dialog:** the viewer is a `Modal` with `role=\"dialog\"` and `aria-modal`, named by\n `ariaLabel` (\"Image viewer\" by default) rather than by the image's alt, which changes with every\n image. Focus moves to the close button when it opens, Tab stays inside, Escape closes it when\n it's the topmost overlay, and focus goes back to the trigger, or to whatever had it when `open`\n was set.\n- **Real triggers:** each `Lightbox.Trigger` is a `<button type=\"button\" aria-haspopup=\"dialog\">`,\n or the button `Button` renders with `as={Button}`, named by its content. So the thumbnail's `alt`\n is the button's name, as long as it isn't inside a `<figure>` (give a ratio `Image` `as=\"div\"`).\n- **Every image has an alt:** `alt` is required in the type, a development build warns once for an\n item without one, and the caption is the `<figure>`'s `<figcaption>`, which names it.\n- **Moves are announced:** after the viewer opens and after each move, a polite status line says\n \"Image 3 of 10: Harbour at dusk\", from `labels.progress` and the image's alt. The visible counter\n is hidden from screen readers, so it isn't read twice. For an image that fails to load, the line\n starts with `labels.loadError`: \"This image didn't load. Image 3 of 10: Harbour at dusk\", and a\n Retry that fails again is announced again.\n- **At the ends:** with `repeat={false}`, the previous or next button is `aria-disabled` but stays in\n the tab order, so focus isn't dropped when it stops working. The zoom buttons do the same at their\n limits.\n- **Single-pointer alternatives:** pinch has the zoom buttons and a double click or tap. Panning a\n zoomed image is a drag, so zoom-out and reset are always one press away, and the arrow keys pan.\n- **Right to left:** the arrows, the keys and swipes follow the reading direction, so the next\n image is always the way the next arrow points.\n- **Contrast:** the counter, the caption and the buttons' icons are white on Bulma's near-black\n modal background in both schemes, well over the 4.5:1 WCAG asks of text.\n- **Forced colors:** the buttons draw their borders in the system's colors and the focus ring\n shows. A button that does nothing at an end or a zoom limit draws in the system's color for a\n disabled control, at full strength rather than faded.\n- **Motion:** the open fade, the crossfade between images and the zoom transition stop under\n `prefers-reduced-motion: reduce`.",
@@ -7,23 +7,28 @@
7
7
  "examples": [
8
8
  {
9
9
  "title": "Default Media",
10
- "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>Alexander Hamilton</Strong> <small>@hamilton</small>{' '}\n <small>31m</small>\n <br />\n If men were angels, no government would be necessary. If angels were to\n govern men, neither external nor internal controls on government would\n be necessary.\n </Paragraph>\n </Content>\n <Level as=\"div\" isMobile>\n <Level.Left>\n <Level.Item>\n <IconButton\n color=\"text\"\n size=\"small\"\n icon=\"reply\"\n aria-label=\"Reply\"\n />\n </Level.Item>\n <Level.Item>\n <IconButton\n color=\"text\"\n size=\"small\"\n icon=\"retweet\"\n aria-label=\"Retweet\"\n />\n </Level.Item>\n <Level.Item>\n <IconButton\n color=\"text\"\n size=\"small\"\n icon=\"heart\"\n aria-label=\"Like\"\n />\n </Level.Item>\n </Level.Left>\n </Level>\n </Media.Content>\n <Media.Right>\n <Delete aria-label=\"delete\" />\n </Media.Right>\n</Media>"
10
+ "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>Alexander Hamilton</Strong> <small>@hamilton</small>{' '}\n <small>31m</small>\n <br />\n If men were angels, no government would be necessary. If angels were to\n govern men, neither external nor internal controls on government would\n be necessary.\n </Paragraph>\n </Content>\n <Level as=\"div\" isMobile>\n <Level.Left>\n <Level.Item>\n <IconButton\n color=\"text\"\n size=\"small\"\n icon=\"reply\"\n aria-label=\"Reply\"\n />\n </Level.Item>\n <Level.Item>\n <IconButton\n color=\"text\"\n size=\"small\"\n icon=\"retweet\"\n aria-label=\"Retweet\"\n />\n </Level.Item>\n <Level.Item>\n <IconButton\n color=\"text\"\n size=\"small\"\n icon=\"heart\"\n aria-label=\"Like\"\n />\n </Level.Item>\n </Level.Left>\n </Level>\n </Media.Content>\n <Media.Right>\n <Delete aria-label=\"delete\" />\n </Media.Right>\n</Media>",
11
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
11
12
  },
12
13
  {
13
14
  "title": "Media With Inputs",
14
- "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Field>\n <Control as=\"p\">\n <TextArea placeholder=\"Add a comment...\" />\n </Control>\n </Field>\n <Level as=\"div\">\n <Level.Left>\n <Level.Item>\n <Button color=\"info\">Submit</Button>\n </Level.Item>\n </Level.Left>\n <Level.Right>\n <Level.Item>\n <Checkbox>Press enter to submit</Checkbox>\n </Level.Item>\n </Level.Right>\n </Level>\n </Media.Content>\n</Media>"
15
+ "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Field>\n <Control as=\"p\">\n <TextArea placeholder=\"Add a comment...\" />\n </Control>\n </Field>\n <Level as=\"div\">\n <Level.Left>\n <Level.Item>\n <Button color=\"info\">Submit</Button>\n </Level.Item>\n </Level.Left>\n <Level.Right>\n <Level.Item>\n <Checkbox>Press enter to submit</Checkbox>\n </Level.Item>\n </Level.Right>\n </Level>\n </Media.Content>\n</Media>",
16
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
15
17
  },
16
18
  {
17
19
  "title": "Nested Media",
18
- "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>John Jay</Strong>\n <br />\n The people, in their collective capacity, are the ultimate authority.\n The Union is essential to the security of the people of America against\n foreign danger.\n <br />\n <small>\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Like\n </LinkButton>{' '}\n &middot;{' '}\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Reply\n </LinkButton>{' '}\n &middot; 3 hrs\n </small>\n </Paragraph>\n </Content>\n {/* First nested media */}\n <Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"48x48\"\n src=\"/img/carousel/carousel-banner-2-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>James Madison</Strong>\n <br />\n The accumulation of all powers, legislative, executive, and\n judiciary, in the same hands, may justly be pronounced the very\n definition of tyranny.\n <br />\n <small>\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Like\n </LinkButton>{' '}\n &middot;{' '}\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Reply\n </LinkButton>{' '}\n &middot; 2 hrs\n </small>\n </Paragraph>\n </Content>\n {/* 2nd nested media (two siblings) */}\n <Media>\n Experience has taught mankind the necessity of auxiliary precautions.\n </Media>\n <Media>Ambition must be made to counteract ambition.</Media>\n </Media.Content>\n </Media>\n {/* Second nested media */}\n <Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"48x48\"\n src=\"/img/carousel/carousel-banner-3-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>Alexander Hamilton</Strong>\n <br />\n Safety from external danger is the most powerful director of\n national conduct. The desire for respect and security will always\n influence the policy of nations.\n <br />\n <small>\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Like\n </LinkButton>{' '}\n &middot;{' '}\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Reply\n </LinkButton>{' '}\n &middot; 2 hrs\n </small>\n </Paragraph>\n </Content>\n </Media.Content>\n </Media>\n </Media.Content>\n</Media>"
20
+ "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>John Jay</Strong>\n <br />\n The people, in their collective capacity, are the ultimate authority.\n The Union is essential to the security of the people of America against\n foreign danger.\n <br />\n <small>\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Like\n </LinkButton>{' '}\n &middot;{' '}\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Reply\n </LinkButton>{' '}\n &middot; 3 hrs\n </small>\n </Paragraph>\n </Content>\n {/* First nested media */}\n <Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"48x48\"\n src=\"/img/carousel/carousel-banner-2-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>James Madison</Strong>\n <br />\n The accumulation of all powers, legislative, executive, and\n judiciary, in the same hands, may justly be pronounced the very\n definition of tyranny.\n <br />\n <small>\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Like\n </LinkButton>{' '}\n &middot;{' '}\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Reply\n </LinkButton>{' '}\n &middot; 2 hrs\n </small>\n </Paragraph>\n </Content>\n {/* 2nd nested media (two siblings) */}\n <Media>\n Experience has taught mankind the necessity of auxiliary precautions.\n </Media>\n <Media>Ambition must be made to counteract ambition.</Media>\n </Media.Content>\n </Media>\n {/* Second nested media */}\n <Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"48x48\"\n src=\"/img/carousel/carousel-banner-3-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>Alexander Hamilton</Strong>\n <br />\n Safety from external danger is the most powerful director of\n national conduct. The desire for respect and security will always\n influence the policy of nations.\n <br />\n <small>\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Like\n </LinkButton>{' '}\n &middot;{' '}\n <LinkButton variant=\"underline\" size=\"small\" color=\"link\">\n Reply\n </LinkButton>{' '}\n &middot; 2 hrs\n </small>\n </Paragraph>\n </Content>\n </Media.Content>\n </Media>\n </Media.Content>\n</Media>",
21
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
19
22
  },
20
23
  {
21
24
  "title": "Media With Button Below",
22
- "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Field>\n <Control as=\"p\">\n <TextArea placeholder=\"Add a comment...\" />\n </Control>\n </Field>\n <Field>\n <Control as=\"p\">\n <Button>Post comment</Button>\n </Control>\n </Field>\n </Media.Content>\n</Media>"
25
+ "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Field>\n <Control as=\"p\">\n <TextArea placeholder=\"Add a comment...\" />\n </Control>\n </Field>\n <Field>\n <Control as=\"p\">\n <Button>Post comment</Button>\n </Control>\n </Field>\n </Media.Content>\n</Media>",
26
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
23
27
  },
24
28
  {
25
29
  "title": "Compound (dot-notation) usage",
26
- "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <p>\n <strong>John Smith</strong> <small>@johnsmith</small>\n <br />\n Composed entirely from the single Media import via dot notation.\n </p>\n </Content>\n </Media.Content>\n <Media.Right>\n <Button size=\"small\">Reply</Button>\n </Media.Right>\n</Media>"
30
+ "code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <p>\n <strong>John Smith</strong> <small>@johnsmith</small>\n <br />\n Composed entirely from the single Media import via dot notation.\n </p>\n </Content>\n </Media.Content>\n <Media.Right>\n <Button size=\"small\">Reply</Button>\n </Media.Right>\n</Media>",
31
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
27
32
  }
28
33
  ],
29
34
  "accessibility": "- The Media root renders as a semantic `<article>` by default. Use `as=\"div\"` for a generic container.\n- The left section is commonly used for avatars (as `<figure>`) and is screen-reader accessible.\n- Use clear and descriptive text in content and actions for best accessibility.\n- The `Level` rows in these examples hold actions, not navigation, so they pass `as=\"div\"` rather than render Level's default `<nav>`, a navigation landmark.\n- Make an action a `<button>`, like the icon-only [`IconButton`](https://bestax.io/docs/api/elements/iconbutton)s in the first example, which require a name (`aria-label`) and hide their glyph from assistive technology. Make it a link only when it goes somewhere, with an `href`: an `<a>` without one takes no keyboard focus and isn't announced as anything to activate.\n\n:::note\nWhen using only icons or controls, provide `aria-label` or screen-reader-only content as appropriate.\n:::",
@@ -7,11 +7,13 @@
7
7
  "examples": [
8
8
  {
9
9
  "title": "Complete Navbar with Burger and Menu",
10
- "code": "function example() {\n const [active, setActive] = useState(false);\n\n return (\n <Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n <Navbar.Burger\n active={active}\n onClick={() => setActive(a => !a)}\n aria-label=\"menu\"\n aria-expanded={active}\n />\n </Navbar.Brand>\n <Navbar.Menu active={active}>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n <Navbar.Item href=\"#\">About</Navbar.Item>\n <Navbar.Item href=\"#\">Contact</Navbar.Item>\n </Navbar.Start>\n <Navbar.End>\n <Navbar.Item href=\"#\">Login</Navbar.Item>\n </Navbar.End>\n </Navbar.Menu>\n </Navbar>\n );\n}"
10
+ "code": "function example() {\n const [active, setActive] = useState(false);\n\n return (\n <Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n <Navbar.Burger\n active={active}\n onClick={() => setActive(a => !a)}\n aria-label=\"menu\"\n aria-expanded={active}\n />\n </Navbar.Brand>\n <Navbar.Menu active={active}>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n <Navbar.Item href=\"#\">About</Navbar.Item>\n <Navbar.Item href=\"#\">Contact</Navbar.Item>\n </Navbar.Start>\n <Navbar.End>\n <Navbar.Item href=\"#\">Login</Navbar.Item>\n </Navbar.End>\n </Navbar.Menu>\n </Navbar>\n );\n}",
11
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
11
12
  },
12
13
  {
13
14
  "title": "Brand Only",
14
- "code": "<Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n</Navbar>"
15
+ "code": "<Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n</Navbar>",
16
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
15
17
  },
16
18
  {
17
19
  "title": "Burger Only",
@@ -27,7 +29,8 @@
27
29
  },
28
30
  {
29
31
  "title": "Navigation Links and Dropdowns",
30
- "code": "<Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n <Navbar.Dropdown hoverable>\n <Navbar.Link>More</Navbar.Link>\n <Navbar.DropdownMenu>\n <Navbar.Item href=\"#\">About</Navbar.Item>\n <Navbar.Item href=\"#\">Jobs</Navbar.Item>\n <Navbar.Item href=\"#\">Contact</Navbar.Item>\n <Navbar.Divider />\n <Navbar.Item href=\"#\">Report an issue</Navbar.Item>\n </Navbar.DropdownMenu>\n </Navbar.Dropdown>\n </Navbar.Start>\n </Navbar.Menu>\n</Navbar>"
32
+ "code": "<Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n <Navbar.Dropdown hoverable>\n <Navbar.Link>More</Navbar.Link>\n <Navbar.DropdownMenu>\n <Navbar.Item href=\"#\">About</Navbar.Item>\n <Navbar.Item href=\"#\">Jobs</Navbar.Item>\n <Navbar.Item href=\"#\">Contact</Navbar.Item>\n <Navbar.Divider />\n <Navbar.Item href=\"#\">Report an issue</Navbar.Item>\n </Navbar.DropdownMenu>\n </Navbar.Dropdown>\n </Navbar.Start>\n </Navbar.Menu>\n</Navbar>",
33
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
31
34
  },
32
35
  {
33
36
  "title": "Custom Link Component",
@@ -39,11 +42,13 @@
39
42
  },
40
43
  {
41
44
  "title": "Spaced Navbar",
42
- "code": "<Navbar isSpaced>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n <Navbar.Dropdown hoverable>\n <Navbar.Link>More</Navbar.Link>\n <Navbar.DropdownMenu>\n <Navbar.Item href=\"#\">About</Navbar.Item>\n <Navbar.Item href=\"#\">Contact</Navbar.Item>\n </Navbar.DropdownMenu>\n </Navbar.Dropdown>\n </Navbar.Start>\n </Navbar.Menu>\n</Navbar>"
45
+ "code": "<Navbar isSpaced>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n <Navbar.Dropdown hoverable>\n <Navbar.Link>More</Navbar.Link>\n <Navbar.DropdownMenu>\n <Navbar.Item href=\"#\">About</Navbar.Item>\n <Navbar.Item href=\"#\">Contact</Navbar.Item>\n </Navbar.DropdownMenu>\n </Navbar.Dropdown>\n </Navbar.Start>\n </Navbar.Menu>\n</Navbar>",
46
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
43
47
  },
44
48
  {
45
49
  "title": "Navbar with a Shadow",
46
- "code": "<Navbar hasShadow>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n </Navbar.Start>\n </Navbar.Menu>\n</Navbar>"
50
+ "code": "<Navbar hasShadow>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n </Navbar.Start>\n </Navbar.Menu>\n</Navbar>",
51
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
47
52
  },
48
53
  {
49
54
  "title": "Fixed Navbar",
@@ -71,7 +76,8 @@
71
76
  },
72
77
  {
73
78
  "title": "Color Modifiers",
74
- "code": "function example() {\n const colors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n ] as const;\n return (\n <>\n {colors.map(color => (\n <Navbar key={color} color={color} mb=\"2\">\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n <Navbar.Item href=\"#\">Components</Navbar.Item>\n </Navbar.Start>\n </Navbar.Menu>\n </Navbar>\n ))}\n </>\n );\n}"
79
+ "code": "function example() {\n const colors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n ] as const;\n return (\n <>\n {colors.map(color => (\n <Navbar key={color} color={color} mb=\"2\">\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n <Navbar.Item href=\"#\">Components</Navbar.Item>\n </Navbar.Start>\n </Navbar.Menu>\n </Navbar>\n ))}\n </>\n );\n}",
80
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
75
81
  },
76
82
  {
77
83
  "title": "Forwarded ref",
@@ -79,7 +85,8 @@
79
85
  },
80
86
  {
81
87
  "title": "Compound (dot-notation) usage",
82
- "code": "<Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n <Navbar.Burger aria-label=\"menu\" />\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n </Navbar.Start>\n <Navbar.End>\n <Navbar.Item href=\"#\">Log in</Navbar.Item>\n </Navbar.End>\n </Navbar.Menu>\n</Navbar>"
88
+ "code": "<Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n <Navbar.Burger aria-label=\"menu\" />\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n </Navbar.Start>\n <Navbar.End>\n <Navbar.Item href=\"#\">Log in</Navbar.Item>\n </Navbar.End>\n </Navbar.Menu>\n</Navbar>",
89
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
83
90
  }
84
91
  ],
85
92
  "accessibility": "- The root `Navbar` renders as `<nav role=\"navigation\" aria-label=\"main navigation\">`.\n The default accessible name is `main navigation`. A screen reader announces it with\n the role, and since the name holds the role word, \"navigation\" is heard twice.\n Pass a name without the role word (`aria-label=\"Site\"`), and a different name\n on each Navbar when a page has more than one. A passed `aria-label` replaces\n the default.\n- `Navbar.Item active` sets `aria-current=\"page\"` on the element `as` renders, the link by\n default, so the current item isn't only a color. An `aria-current` you pass wins: a navbar of\n sections on one page can say `\"location\"`, and `aria-current={false}` turns it off.\n- Bulma fills an active link item with its selected color, the link color in a navbar with no\n `color`, and bestax's styles give its text the color Bulma picks to read on that fill,\n `--bulma-navbar-item-selected-color-l`. Bulma's own stylesheet leaves the text in the navbar's\n normal text color, dark gray on blue on the light scheme, so the rule ships in `bestax.css` and\n `extras.css`. A `--bulma-navbar-item-color` you set on the item itself still wins, and an item\n with a `bgColor` keeps the navbar's text color. A rule of your own that takes the fill off\n restates `color` too.\n- Use semantic links (`<a>`) and buttons, and provide clear `aria-label` and `aria-expanded` for the burger toggle.\n- `Navbar.Link` inside a `Navbar.Dropdown` automatically gets `aria-haspopup=\"true\"` and\n `aria-expanded` synced to the dropdown's open state — no manual wiring required.\n <kbd>Enter</kbd>/<kbd>Space</kbd> toggle the dropdown open/closed, and <kbd>Escape</kbd>\n closes it and keeps focus on the link. <kbd>Escape</kbd> anywhere else in the open dropdown, its\n menu included, puts focus back on the link and closes it too, unless a control there marks the\n key used, the key comes from a dialog or from content opened from the menu into a portal, or\n focus can't go back to the link. Focus landing outside an open dropdown, as <kbd>Tab</kbd> past\n its last item or <kbd>Shift</kbd>+<kbd>Tab</kbd> back past its link does, closes it too, so its\n menu isn't left over the page. A controlled one is told through `onActiveChange` and keeps its\n `active`. Focus moving into content opened from the menu into a portal or into a dialog marked\n `aria-modal`, such as a `Modal` an item opens, which gives focus back to the item when it closes, focus going\n nowhere, as the window losing focus does, and a press outside that doesn't move focus leave it\n open. When the trigger isn't interactive on its own — no\n `href`, not `as=\"button\"`, and not a custom component — it also gets `role=\"button\"` and\n `tabIndex={0}` so it's reachable and operable by keyboard, and a mouse/touch click on it\n toggles the dropdown too (a caller-supplied `onClick` still runs, and can\n `preventDefault()` to opt out).\n- A custom component passed to `as` keeps its own semantics, because a router link takes `to`\n rather than `href` and so can't be recognised from the props it's given. If yours renders\n something non-interactive instead, pass `role=\"button\"` and it takes the fallback above —\n `tabIndex` and click included. The keyboard path is wired either way.\n- `hoverable` dropdowns keep working with a mouse (hover-to-open); the keyboard path above\n opens and closes them independently of hover. Bulma shows a `hoverable` dropdown's menu while\n the pointer is on it and while focus is in it, the link included, on a desktop-wide window.\n <kbd>Escape</kbd> puts a menu shown that way away, and it stays away until the pointer has left\n the dropdown and focus has too, or until the pointer comes back or focus moves onto something in\n it. From the page, the key goes on to what has focus; from inside\n the dropdown, focus moves to the link, with the same exceptions as for an open one, such as focus\n that can't go back to the link, where the menu stays. Below the desktop breakpoint, where the menu always\n shows under the burger, Escape doesn't put it away, though it still closes an open one.\n- **Forced colors:** Bulma draws the burger's bars as a background color, which forced colors\n (Windows' contrast themes) replaces, so the burger would vanish there while it still works and\n takes focus. bestax's styles keep its bars visible in the system's button text color. That rule\n ships in `bestax.css` and `extras.css`, not in Bulma's own stylesheet, and an\n [`AppFrame`](https://bestax.io/docs/api/layout/appframe)'s burger gets it too. Bulma marks an active or selected\n link item, `Navbar.Link` and dropdown row with a fill and a text color alone, which forced\n colors replaces, so bestax's styles draw a bar in the system's highlight color inside it there:\n along its bottom in a row, and down its start edge where the items stack, in a dropdown and in\n the menu the burger opens. The item and everything in it stay in the contrast theme's colors,\n and an active tab gets the bar above Bulma's thicker underline. This ships in the same\n stylesheets.\n- **`Navbar.Divider` in forced colors:** Bulma draws it as a background color too, which forced\n colors paints in the dropdown's own color, so the line would vanish. bestax's styles draw it in\n the system's text color there, from the same stylesheets.\n- **An open dropdown's edge in forced colors:** from the desktop breakpoint up, Bulma draws\n `Navbar.DropdownMenu` as a box over the page, edged with a shadow and, for some, a line on the\n side it opens from. Forced colors drops the shadow and paints the box in the page's own color, so\n bestax's styles draw a one pixel line in the system's text color around it there, outside the\n box, so nothing moves. Under the burger its rows sit in the menu, with no box to edge. This\n ships in the same stylesheets.\n- **In a colored [`Hero`](https://bestax.io/docs/api/layout/hero):** Bulma's hero sets the colors its navbar's items\n take on hover and when active, but Bulma's navbar doesn't read them, so a focused or hovered\n item took the scheme's fill under the hero's text, and the active item and the burger took the\n link color. For a `Navbar` with no `color` of its own, bestax's styles draw a focused, hovered or\n active item in the hero's text color with the hero's background color as its text, the burger\n and a tab in the hero's text color, and the dropdown arrow in its link's text color. The menu the\n burger opens, and the dropdown's rows in it, take the hero's background and text, except an\n active row, which keeps Bulma's selected fill and the text that reads on it, and on a phone a bold hero's menu takes the hero's\n own gradient. Where `Navbar.DropdownMenu` is a box of its own, on a desktop, its links keep\n Bulma's colors. That rule ships in `bestax.css` and `extras.css`, not in Bulma's own stylesheet.\n\n:::note\nThere's no arrow-key roving between navbar items, and a press outside an open `Navbar.Dropdown`\ncloses it only when it moves focus there. A press on a field moves focus in every browser, and\none on a button or a link does in some, such as Chrome, and not in others, such as Safari. Bulma navbar dropdowns are hover/click surfaces, so this is\nintentionally kept simple.\n:::",
@@ -11,27 +11,27 @@
11
11
  },
12
12
  {
13
13
  "title": "With Min and Max",
14
- "code": "function example() {\n const [quantity, setQuantity] = useState(1);\n return (\n <Block>\n <Paragraph mb=\"2\">Quantity (1-10):</Paragraph>\n <Numberinput\n value={quantity}\n onChange={setQuantity}\n min={1}\n max={10}\n color=\"primary\"\n />\n </Block>\n );\n}"
14
+ "code": "function example() {\n const [quantity, setQuantity] = useState(1);\n return (\n <Block>\n <Numberinput\n label=\"Quantity (1-10)\"\n value={quantity}\n onChange={setQuantity}\n min={1}\n max={10}\n color=\"primary\"\n />\n </Block>\n );\n}"
15
15
  },
16
16
  {
17
17
  "title": "Color Variants",
18
- "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Numberinput defaultValue={5} color=\"primary\" />\n <Numberinput defaultValue={5} color=\"success\" />\n <Numberinput defaultValue={5} color=\"info\" />\n <Numberinput defaultValue={5} color=\"warning\" />\n <Numberinput defaultValue={5} color=\"danger\" />\n</Block>"
18
+ "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Numberinput aria-label=\"Quantity\" defaultValue={5} color=\"primary\" />\n <Numberinput aria-label=\"Quantity\" defaultValue={5} color=\"success\" />\n <Numberinput aria-label=\"Quantity\" defaultValue={5} color=\"info\" />\n <Numberinput aria-label=\"Quantity\" defaultValue={5} color=\"warning\" />\n <Numberinput aria-label=\"Quantity\" defaultValue={5} color=\"danger\" />\n</Block>"
19
19
  },
20
20
  {
21
21
  "title": "Size Variants",
22
- "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Numberinput defaultValue={5} size=\"small\" color=\"primary\" />\n <Numberinput defaultValue={5} color=\"primary\" />\n <Numberinput defaultValue={5} size=\"medium\" color=\"primary\" />\n <Numberinput defaultValue={5} size=\"large\" color=\"primary\" />\n</Block>"
22
+ "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Numberinput\n aria-label=\"Quantity\"\n defaultValue={5}\n size=\"small\"\n color=\"primary\"\n />\n <Numberinput aria-label=\"Quantity\" defaultValue={5} color=\"primary\" />\n <Numberinput\n aria-label=\"Quantity\"\n defaultValue={5}\n size=\"medium\"\n color=\"primary\"\n />\n <Numberinput\n aria-label=\"Quantity\"\n defaultValue={5}\n size=\"large\"\n color=\"primary\"\n />\n</Block>"
23
23
  },
24
24
  {
25
25
  "title": "Controls Position",
26
- "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Block>\n <Paragraph mb=\"1\">Both sides (default)</Paragraph>\n <Numberinput defaultValue={5} controlsPosition=\"both\" color=\"primary\" />\n </Block>\n <Block>\n <Paragraph mb=\"1\">Left only</Paragraph>\n <Numberinput defaultValue={5} controlsPosition=\"left\" color=\"info\" />\n </Block>\n <Block>\n <Paragraph mb=\"1\">Right only</Paragraph>\n <Numberinput defaultValue={5} controlsPosition=\"right\" color=\"success\" />\n </Block>\n</Block>"
26
+ "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Block>\n <Numberinput\n label=\"Both sides (default)\"\n defaultValue={5}\n controlsPosition=\"both\"\n color=\"primary\"\n />\n </Block>\n <Block>\n <Numberinput\n label=\"Left only\"\n defaultValue={5}\n controlsPosition=\"left\"\n color=\"info\"\n />\n </Block>\n <Block>\n <Numberinput\n label=\"Right only\"\n defaultValue={5}\n controlsPosition=\"right\"\n color=\"success\"\n />\n </Block>\n</Block>"
27
27
  },
28
28
  {
29
29
  "title": "Rounded Buttons",
30
- "code": "<Numberinput defaultValue={5} controlsRounded color=\"primary\" />"
30
+ "code": "<Numberinput\n aria-label=\"Quantity\"\n defaultValue={5}\n controlsRounded\n color=\"primary\"\n/>"
31
31
  },
32
32
  {
33
33
  "title": "Custom Step",
34
- "code": "function example() {\n const [value, setValue] = useState(0);\n return (\n <Block>\n <Paragraph mb=\"2\">Step by 10:</Paragraph>\n <Numberinput\n value={value}\n onChange={setValue}\n step={10}\n min={0}\n max={100}\n color=\"info\"\n />\n <Paragraph mt=\"2\">Value: {value}</Paragraph>\n </Block>\n );\n}"
34
+ "code": "function example() {\n const [value, setValue] = useState(0);\n return (\n <Block>\n <Numberinput\n label=\"Step by 10\"\n value={value}\n onChange={setValue}\n step={10}\n min={0}\n max={100}\n color=\"info\"\n />\n <Paragraph mt=\"2\">Value: {value}</Paragraph>\n </Block>\n );\n}"
35
35
  },
36
36
  {
37
37
  "title": "Read-only Input",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  {
45
45
  "title": "Disabled State",
46
- "code": "<Numberinput defaultValue={5} disabled />"
46
+ "code": "<Numberinput aria-label=\"Quantity\" defaultValue={5} disabled />"
47
47
  },
48
48
  {
49
49
  "title": "Context-Aware Rendering › Default (with label)",
@@ -28,11 +28,13 @@
28
28
  },
29
29
  {
30
30
  "title": "Skeleton Examples from useBulmaClasses.stories.tsx › Skeleton Image",
31
- "code": "<Image skeleton src=\"/img/react-logo.png\" alt=\"Skeleton image\" size=\"128x128\" />"
31
+ "code": "<Image skeleton src=\"/img/react-logo.png\" alt=\"Skeleton image\" size=\"128x128\" />",
32
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
32
33
  },
33
34
  {
34
35
  "title": "Skeleton Examples from useBulmaClasses.stories.tsx › Skeleton Media",
35
- "code": "<Media skeleton aria-hidden=\"true\">\n <Media.Left>\n <Image\n skeleton\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>Skeleton Name</Strong> <small>@skelly</small> <small>1m</small>\n <br />\n This is a skeleton media example.\n </Paragraph>\n </Content>\n </Media.Content>\n</Media>"
36
+ "code": "<Media skeleton aria-hidden=\"true\">\n <Media.Left>\n <Image\n skeleton\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Content>\n <Paragraph>\n <Strong>Skeleton Name</Strong> <small>@skelly</small> <small>1m</small>\n <br />\n This is a skeleton media example.\n </Paragraph>\n </Content>\n </Media.Content>\n</Media>",
37
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
36
38
  },
37
39
  {
38
40
  "title": "Skeleton Examples from useBulmaClasses.stories.tsx › Skeleton Notification",
@@ -11,23 +11,23 @@
11
11
  },
12
12
  {
13
13
  "title": "With Output Display",
14
- "code": "function example() {\n const [value, setValue] = useState(50);\n return (\n <Block>\n <Slider value={value} onChange={setValue} showOutput color=\"primary\" />\n <Paragraph mt=\"4\">Value: {value}</Paragraph>\n </Block>\n );\n}"
14
+ "code": "function example() {\n const [value, setValue] = useState(50);\n return (\n <Block>\n <Slider\n aria-label=\"Value\"\n value={value}\n onChange={setValue}\n showOutput\n color=\"primary\"\n />\n <Paragraph mt=\"4\">Value: {value}</Paragraph>\n </Block>\n );\n}"
15
15
  },
16
16
  {
17
17
  "title": "Color Variants",
18
- "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Slider defaultValue={50} color=\"primary\" showOutput />\n <Slider defaultValue={50} color=\"success\" showOutput />\n <Slider defaultValue={50} color=\"info\" showOutput />\n <Slider defaultValue={50} color=\"warning\" showOutput />\n <Slider defaultValue={50} color=\"danger\" showOutput />\n</Block>"
18
+ "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Slider aria-label=\"Value\" defaultValue={50} color=\"primary\" showOutput />\n <Slider aria-label=\"Value\" defaultValue={50} color=\"success\" showOutput />\n <Slider aria-label=\"Value\" defaultValue={50} color=\"info\" showOutput />\n <Slider aria-label=\"Value\" defaultValue={50} color=\"warning\" showOutput />\n <Slider aria-label=\"Value\" defaultValue={50} color=\"danger\" showOutput />\n</Block>"
19
19
  },
20
20
  {
21
21
  "title": "Size Variants",
22
- "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Block>\n <Paragraph mb=\"1\">Small</Paragraph>\n <Slider defaultValue={50} size=\"small\" color=\"primary\" />\n </Block>\n <Block>\n <Paragraph mb=\"1\">Normal</Paragraph>\n <Slider defaultValue={50} color=\"primary\" />\n </Block>\n <Block>\n <Paragraph mb=\"1\">Medium</Paragraph>\n <Slider defaultValue={50} size=\"medium\" color=\"primary\" />\n </Block>\n <Block>\n <Paragraph mb=\"1\">Large</Paragraph>\n <Slider defaultValue={50} size=\"large\" color=\"primary\" />\n </Block>\n</Block>"
22
+ "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Block>\n <Slider label=\"Small\" defaultValue={50} size=\"small\" color=\"primary\" />\n </Block>\n <Block>\n <Slider label=\"Normal\" defaultValue={50} color=\"primary\" />\n </Block>\n <Block>\n <Slider label=\"Medium\" defaultValue={50} size=\"medium\" color=\"primary\" />\n </Block>\n <Block>\n <Slider label=\"Large\" defaultValue={50} size=\"large\" color=\"primary\" />\n </Block>\n</Block>"
23
23
  },
24
24
  {
25
25
  "title": "Rounded and Circle",
26
- "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Block>\n <Paragraph mb=\"1\">Rounded</Paragraph>\n <Slider defaultValue={50} isRounded color=\"info\" showOutput />\n </Block>\n <Block>\n <Paragraph mb=\"1\">Circle Thumb</Paragraph>\n <Slider defaultValue={50} isCircle color=\"success\" showOutput />\n </Block>\n <Block>\n <Paragraph mb=\"1\">Both</Paragraph>\n <Slider defaultValue={50} isRounded isCircle color=\"warning\" showOutput />\n </Block>\n</Block>"
26
+ "code": "<Block display=\"flex\" flexDirection=\"column\">\n <Block>\n <Slider\n label=\"Rounded\"\n defaultValue={50}\n isRounded\n color=\"info\"\n showOutput\n />\n </Block>\n <Block>\n <Slider\n label=\"Circle Thumb\"\n defaultValue={50}\n isCircle\n color=\"success\"\n showOutput\n />\n </Block>\n <Block>\n <Slider\n label=\"Both\"\n defaultValue={50}\n isRounded\n isCircle\n color=\"warning\"\n showOutput\n />\n </Block>\n</Block>"
27
27
  },
28
28
  {
29
29
  "title": "Custom Range",
30
- "code": "function example() {\n const [value, setValue] = useState(500);\n return (\n <Block>\n <Slider\n value={value}\n onChange={setValue}\n min={0}\n max={1000}\n step={50}\n showOutput\n color=\"primary\"\n />\n <Paragraph mt=\"4\">Value: ${value}</Paragraph>\n </Block>\n );\n}"
30
+ "code": "function example() {\n const [value, setValue] = useState(500);\n return (\n <Block>\n <Slider\n aria-label=\"Value\"\n value={value}\n onChange={setValue}\n min={0}\n max={1000}\n step={50}\n showOutput\n color=\"primary\"\n />\n <Paragraph mt=\"4\">Value: ${value}</Paragraph>\n </Block>\n );\n}"
31
31
  },
32
32
  {
33
33
  "title": "Range Slider",
@@ -39,11 +39,11 @@
39
39
  },
40
40
  {
41
41
  "title": "Custom Output Format",
42
- "code": "function example() {\n const [value, setValue] = useState(50);\n return (\n <Block>\n <Slider\n value={value}\n onChange={setValue}\n showOutput\n color=\"success\"\n formatOutput={v => `${v}%`}\n />\n <Paragraph mt=\"4\">Progress: {value}%</Paragraph>\n </Block>\n );\n}"
42
+ "code": "function example() {\n const [value, setValue] = useState(50);\n return (\n <Block>\n <Slider\n aria-label=\"Value\"\n value={value}\n onChange={setValue}\n showOutput\n color=\"success\"\n formatOutput={v => `${v}%`}\n />\n <Paragraph mt=\"4\">Progress: {value}%</Paragraph>\n </Block>\n );\n}"
43
43
  },
44
44
  {
45
45
  "title": "Disabled Slider",
46
- "code": "<Slider defaultValue={30} disabled color=\"primary\" />"
46
+ "code": "<Slider aria-label=\"Value\" defaultValue={30} disabled color=\"primary\" />"
47
47
  },
48
48
  {
49
49
  "title": "Context-Aware Rendering › Default (with label)",
@@ -31,7 +31,8 @@
31
31
  },
32
32
  {
33
33
  "title": "A Cover",
34
- "code": "function example() {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n <Button onClick={() => setOpen(true)}>What's new</Button>\n <Tour open={open} onOpenChange={setOpen}>\n <Tour.Step\n title=\"The new editor\"\n cover={<img src=\"/img/carousel/carousel-banner-1-4by3.jpg\" alt=\"\" />}\n >\n The editor now saves as you type.\n </Tour.Step>\n </Tour>\n </>\n );\n}"
34
+ "code": "function example() {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n <Button onClick={() => setOpen(true)}>What's new</Button>\n <Tour open={open} onOpenChange={setOpen}>\n <Tour.Step\n title=\"The new editor\"\n cover={<img src=\"/img/carousel/carousel-banner-1-4by3.jpg\" alt=\"\" />}\n >\n The editor now saves as you type.\n </Tour.Step>\n </Tour>\n </>\n );\n}",
35
+ "note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
35
36
  },
36
37
  {
37
38
  "title": "A Footer of Your Own",